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

Re: [MacPerl] Non-US Characters




Marcus Sen wrote:

>For example, If you look in the RegExp section of the Perl FAQ you will see
>that in the case of multi-byte languages it basically says that they are just too
>difficult to handle nicely at the moment.

Sometimes the Perl FAQ is the wrong place to search for information. Especially if
you wan't to process two-byte characters the FAQ won't help much. 
If you cannot handle things nicely [sic!] , write or get a function which will do the 
dirty part for you. Appart from Unicode::String (CPAN) which gives you an idea 
how to write a two-byte character module to handle "things nicely", there are other 
valuable information sources for Japanese information processing.

Ken Lunde's "Perl & Multiple-byte Characters" 
ftp://ftp.oreilly.com/pub/examples/nutshell/ujip/perl/perl97.pdf
should be an good starting point. In the same directory (ujip/perl/) you will find
a lot of usefull examples as well.


>In the case of Japanese, however, the benefit of being able to use powerful Perl text
>processing on Japanese text probably does justify the effort of maintaining the
>separate Perl (and MacJPerl) versions.

Not that powerfull! Not all functions are two-byte character clean and you loose
portability. Anyway, JPerl is an good starting point for newbies. 

I usually use "powerfull Perl text processing on Japanese text" with the standard
port. (But there are cases I use MacJPerl. E.g as a prototyping environment for
MacPerl:-)
>P.S.
>I found the easiest way to transfer Japanese text between Mac and
>Unix machines was to use a program called JCONV-DD (available I think at
>info-mac) which you can set to do the conversion between Shift-JIS
>and EUC (together with the CR to LF line break conversion) just by dropping
>your text files onto it.  Then transfer by Anarchie or whatever FTP client
>in binary mode.

For conversion between different japanese character-sets (SJIS,JIS,EUC) you can
use a KCONV port from MacPerl. 
http://cybaba.kek.jp/~yosimoto/MacPerl/


Andreas Marcel Riechert

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch