Re: Chinese word problem

2007-05-15 Thread Thomas Yan
'我' takes 2 bytes '\0' takes 1 byte , so "我“ takes 3 Every chinese charecter takes 2 bytes - Original Message - From: Neil To: beginners@perl.org Sent: Wednesday, May 16, 2007 1:57 PM Subject: Chinese word problem Dear All: Question: How come the length of Chin

RE: Chinese word problem

2007-05-15 Thread Neil
’? What for? What is the benefit? Thanks again. _ From: Thomas Yan [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 2:14 PM To: Neil; beginners@perl.org Subject: Re: Chinese word problem '我' takes 2 bytes '\0' takes 1 byte , so "我“

Re: Chinese word problem

2007-05-15 Thread Jeff Pang
Thomas Yan 写道: '我' takes 2 bytes '\0' takes 1 byte , so "我“ takes 3 Not right.This was not like C's char str[] form. I think the origin ppl's words are in some encoding form like base64. For me I got exactly 2 bytes.like, perl -le 'print length("我")' 2 -- Jeff Pang http://home.arcor.de/jeffp

RE: Chinese word problem

2007-05-16 Thread Neil
It's wired! I did the same thing and got the result of 3 perl -le 'print length("我")' 3 Pls see the attachment Thank you. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 2:40 PM To: Thomas Yan Cc: Neil; beginners@perl

Re: Chinese word problem

2007-05-16 Thread Mug
Neil wrote: > > Dear All: > > Question: > > How come the length of Chinese word I print shows “ 3 “. > > Isn’t it supposed to 2 bytes? > > Program: > > --- > > $str=”我”; > > $str_len = length($str); > > Print $str_len, “\n\n”; > >

Re: Chinese word problem

2007-05-16 Thread Jeff Pang
Neil 写道: > It's wired! > I did the same thing and got the result of 3 > > perl -le 'print length("我")' > 3 > Pls see the attachment How about your shell environment? For me something are: SHELL=/bin/bash LC_ALL=C LANG=en_US.en -- Jeff Pang http://home.arcor.de/jeffpang/ -- To unsubscribe, e-m

Re: Chinese word problem

2007-05-16 Thread Mumia W.
On 05/16/2007 12:57 AM, Neil wrote: Dear All: Question: How come the length of Chinese word I print shows “ 3 “. Isn’t it supposed to 2 bytes? Program: --- $str=”我”; $str_len = length($str); Print $str_len, “\n\n”; The res

RE: Chinese word problem

2007-05-16 Thread Neil
rd locale ("C"). 3 [EMAIL PROTECTED] perlPratice]# --- -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 3:22 PM To: Neil Cc: 'Thomas Yan'; beginn

Re: Chinese word problem

2007-05-16 Thread Jeff Pang
Neil 写道: > I did check the environment, > And set the same settings like your's, > But the result still got 3 > > Some thing different is that there are some warring from perl, > And I have no clue how to deal with it. > > Thanks > > [

RE: Chinese word problem

2007-05-21 Thread Neil
computer's (all intel x86) all got the same result 3 , so I still got no clued. Thank you. Best Regard Neil -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 10:22 AM To: Perl Beginners Subject: Re: Chinese word problem Neil 写道: > I did chec