Home
TeamSite
Chinese characters problem
yuvpurush
Hi,
Im working on a TS chinese implementation.
Im developing the DCTs in my notebook, which is TS6.5, Win2k server, English OS and all are perfectly working.
I developed some DCT and then ported into the dev machine which is with TS6.5, Win 2003 Server with Chinse OS
I get problems while generating the content in the chinse server.
The DCRs are created using chinese
In the TPL, while previewing, it is not working properly. There are some If conditon in the perl script.
When i log the information, im equating 2 variables. Boths shows the correct chinese characters. But the length of one variable is 5 and the other one is 15. I've trimmed it and still no use.
As a result the condition fails and i cant preview it.
The DCTs and the TPls are of UTF-8 encoding.
The locale setting in the iwserver is server_locale=SimplifiedChinese_China.MS936@Binary;
The browser encoding has been set to UTF-8
Can somebody through some light on this, which setting i've failed to make. This is my first non english implementation. any help is highly appreciated.
Find more posts tagged with
Comments
Frederik
could you post the TPL?
This may be related to the way Perl handles char encoding. It all depends on where your variables are coming from and what Perl knows about them... e.g. if one is regarded as "raw" and the other as "utf-8" then Perl may see 5 chars in UTF-8 and 5x 3 bytes in raw... as far as I understood.
I'm no expert, but I've had to fight a good deal with Perl and char encoding for our own projects.
Sailesh
The two variables you are equating where are they getting their values from?? May be the issue is at the source.
Also you can do charater encoding (and then equate) to aviod these kind of issues.
Frederik
@yuvpurush
: it's considered good practice to follow up your posts, y'know. Even if just to say you solved it yourself (and how) ;-)
yuvpurush
Hi,
sorry about that. I was not at the office for the past 2 days .. today morning thought of using some other option and tried it and i got it.
After using like this, my problem got solved..
$dcr_content=encode_utf8($dcr_content);
Thanks
Yuv