real-life example LC_CTYPE effects?

Albert-Jan Roskam fomcl at yahoo.com
Mon Oct 20 16:33:49 EDT 2014


Hi,

The locale category LC_CTYPE may affect character classification and case conversion.

That's the theory. Can you give a practical example where this locale setting matters? Eg.:
locale.setlocale(locale.LC_CTYPE, loc)
m = re.match("\d+", s, re.I | re.L)

So with two different values for loc, and s is identical, there will or won't be a match.

Thanks!

Albert-Jan



More information about the Python-list mailing list