Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] ruby and python in Japan



> Regarding python,...
> Maybe this is obvious, but this is your responsibility as a programmer
> to check your input (is it euc-jp, utf-8, utf-16 encoded string), turn
> that into a unicode string for processing  (decode) (including regular
> expression and the like) and then when returning the result (to the
> screen, printer, file, socket etc...) to encode the result in the
> encoding expected by the API.

Or, in PHP you could use mbstring.http_input to "auto", and
mbstring.http_output to the desired encoding, and then forget about it.
(Despite the name http_output works for non-web scripts as well; I don't
know if http_input will convert stdin for you; I've never tried.)

Darren



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links