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
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
>
> [
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
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
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
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”;
>
>
.org
Subject: Re: Chinese word problem
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
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
’?
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 "我“
'我' 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:
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 result is 3
I took a pictur
11 matches
Mail list logo