Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]tlug: Perl Problem with 2-byte char [Off Topic?]
- To: tlug@example.com
- Subject: tlug: Perl Problem with 2-byte char [Off Topic?]
- From: "Atlas21 Shawn" <gray_s@example.com>
- Date: Tue, 31 Aug 1999 13:45:53 +0900
- Content-Disposition: inline
- Content-type: text/plain; charset=iso-2022-jp
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
Hi all, I am having a problem with a double-byte character in a perl script I am writing. I asked this question on ActiveStates Perl mailing list, but got no helpful response. Not many double-byte users on there, it seems. I was hoping that with this being a linux list in Japan that there might be some people on here with enough knowledge/experience in working with Perl in a double-byte environment to offer some help/advice. My environment is Japanese perl (jperl) on FreeBSD. My script basically takes an input string and searches a text file for matches. The text file contains both single- and double-tye characters. The script searches the text file for lines containing the input string, then returns the whole line (not just the input string only). This works fine with both single- and double-byte characters except for the character "ー" (the long vowel hypen as in サービス). If this char is not input, but occurs in the line in the text file, the results are output as intended. However, if the char is input by the user, I get an error referring to an incorrect character. I think this is because the double-byte code for this char is interpreted as containing a "]," which confuses the script. Does anyone have any ideas as to how to get the script to accept input of this char? Thanks in advice for any help, and sorry if this was off topic. Shawn Gray Translator / Perl Scripter Wanna-be Canon, Inc. ------------------------------------------------------------------- Next Nomikai: September 17 (Fri), 19:30 Tengu TokyoEkiMae 03-3275-3691 Next Technical Meeting: October 9 (Sat), 13:00 place: Temple Univ. ------------------------------------------------------------------- more info: http://www.tlug.gr.jp Sponsor: Global Online Japan
- Follow-Ups:
- Re: tlug: Perl Problem with 2-byte char [Off Topic?]
- From: Simon Cozens <simon@example.com>
- tlug: Perl Problem with 2-byte char [Off Topic?]
- From: "Stephen J. Turnbull" <turnbull@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tlug: mail weirdness [the mutt way]
- Next by Date: Re: tlug: programming
- Prev by thread: Re: tlug: programming
- Next by thread: Re: tlug: Perl Problem with 2-byte char [Off Topic?]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links