home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7575 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.5 KB  |  63 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!sranha!sranhd!sran230!utashiro
  3. From: utashiro@sran230.sra.co.jp (Kazumasa Utashiro)
  4. Subject: Re: Japanese character stuff (Was: Perl 5 and Latin-1)
  5. References: <mark.724768788@coombs>
  6. Organization: Software Research Associates, Inc., Japan
  7. Date: Tue, 22 Dec 1992 02:41:40 GMT
  8. Message-ID: <Bzn3HI.MCy@sran230.sra.co.jp>
  9. Lines: 52
  10.  
  11. In article <mark.724768788@coombs> mark@coombs.anu.edu.au (Mark) writes:
  12. >> barnett@paintbrush.mcc.com (Jim Barnett) writes:
  13. >> >kono@csl.sony.co.jp (Shinji Kono) writes:
  14. >> 
  15. >> >   Support for 8bit char and multi-byte code sounds very good. I heard
  16. >> >   there is a two byte char code version of perl for Japanese.
  17. >> 
  18. >> >Could anyone point me to this version of Perl? We're doing a project
  19. >> >involving a large amount of Japanese text, and a 2-byte version would
  20. >> >be a big help. I've been able to trick the regexp matcher into doing
  21. >> >simple matches, but fancier things would be a problem.
  22. >> 
  23. >> I'm not sure about the C code version but I'm sure if you ftp'd to
  24. >> sra.co.jp you would find some joy there...
  25.  
  26. This library is not for multi-byte character handling but
  27. for Japanese character code conversion.  We are using
  28. several different Japanese character code sets and sometimes
  29. we have to convert from one to another.
  30.  
  31. Perl enhanced to handle Japanese character is called 'jperl'
  32. which is developed by serow@ibix.co.jp and is available by
  33. ftp from many sites including sra.co.jp.
  34.  
  35. Here are basic features of jperl.
  36.  
  37.     + special character handling in string constant
  38.     + regular expression
  39.         . matches to two-byte character
  40.         [a-z] syntax allows to use Japanse
  41.     + tr allows to use Japanese character
  42.     + chop chops last two bytes if it is multi-byte code
  43.     + split(//) returns Japanese character list
  44.     + etc.
  45.     
  46. I personaly don't use jperl because jperl is not compatible
  47. with perl.  That means script written for perl sometimes
  48. doesn't work as expected on jperl.  This happens offten when
  49. the script deals with binary data.
  50.  
  51. As I showed by my jperl.pl library, it is possible to handle
  52. Japanese multi-byte characters by normal perl.  Most of text
  53. processing tools ftpable from sra.co.jp can handle Japanese
  54. character code properly and, of course, works with ascii
  55. text.  But if you want to use Japanese in regexp, jperl is
  56. to be used.
  57.  
  58. It is a problem that my scripts don't work with latin-1
  59. because [\200-\377] is always treated as a first byte of
  60. two-byte character.
  61.  
  62. --utashiro
  63.