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 picture for the program. In case of it doesn’t show Chinese word
in some of your system,

Pls see the attachment

 

My environment:

CPU: Intel Pentium C2D T7200

OS: Fedora Core 6

Perl V: 5.8.8

Encode: Big5

 

Thank you 

 

<<attachment: chineseWord.JPG>>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/

Reply via email to