Japanese (speaking) developer needed for a bit of regex magic
clp2 at rebertia.com
Wed Apr 21 09:07:36 CEST 2010
On Tue, Apr 20, 2010 at 9:52 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Sebastian <basti at redtoad.de> writes:
>> All locales return error messages in English. Only the Japanese uses
>> Japanese which my regular expressions cannot handle at the moment.
> What exactly are you expecting to happen, and what exactly happens
> General advice with character sets in Python apply: always explicitly
> declare the encoding of input, then decode to Unicode interally as early
> as possible, and process all text that way. Only fix into an encoding
> when it's time to output.
I think he has more of a *literal* language problem: He doesn't know
Japanese and thus can't read the Japanese error message in order to
develop a regex for it. I assume there's some reason he can't just do
a blind equality test on the error message string(s).
More information about the Python-list