Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] ruby and python in Japan
- Date: Tue, 27 Feb 2007 11:27:33 +0900
- From: "Guillaume Proux" <gproux@??>
- Subject: Re: [tlug] ruby and python in Japan
- References: <EHEKIFPPAHHMCHHGJIJOGEDCEGAA.jason@example.com> <45E374FB.50904@example.com> <45E38BB2.7010602@example.com> <45E38F83.6090701@example.com>
Hello Brett,
On 2/27/07, Brett Robson <b-robson@??> wrote:I haven't had to deal with Japanese in PHP yet, but my understanding is that PHP doesn't support Unicode and apparently Python does. Does anyone have experience with Japanese programming in PHP or Python?
Regarding python, there has been native support for unicode strings from version 2.0 or so. It means that you can take a byte stream and decode it into a unicode string... or you can take a unicode string and encode it into one of the common text encoding such as utf-8, sjis, euc-jp etc.
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.
I would say that unicode support (hence Japanese support) is straightforward enough in python it never gives any pain.
Have fun.
Regards,
Guillaume
- Follow-Ups:
- Re: [tlug] ruby and python in Japan
- From: Darren Cook
- References:
- RE: [tlug] ruby and python in Japan
- From: Jason Hall
- Re: [tlug] ruby and python in Japan
- From: Micheal E. Cooper
- Re: [tlug] ruby and python in Japan
- From: Brett Robson
- Re: [tlug] ruby and python in Japan
- From: Brett Robson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] ruby and python in Japan
- Next by Date: Re: [tlug] ruby and python in Japan
- Previous by thread: Re: [tlug] ruby and python in Japan
- Next by thread: Re: [tlug] ruby and python in Japan
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links