From: Jamie C. <jca...@we...> - 2003-12-14 21:21:18
|
Another thing you could try to make totally sure that the LANG variable is not responsible is to edit /etc/webmin/start and remove any lines refering to LANG, and then re-start with /etc/webmin/stop ; /etc/webmin/start Also, if you are using an older version of Webmin, take out any PERLIO lines in that same file. - Jamie hzqbbc wrote: > Hi list and jamie: > I failed to do as you describe, and everything work just like beforce. > encode was ok, but fail to decode.. decode doesn't works..sigh.. > At the command line, LANG is zh_CN or en_US, both are ok. But even i > set $ENV{'LANG'} to zh_CN or en_US, decode('utf-8', $string) still failed > to work. > I don't konw why, but decoding shoud be the most basic work in perl. > Encode::decode() in the cgi programe works very fine under apahce or other > web server, but failed in webmin , this is what i had to face and could do > nothing .. :-~~ ( > >> On Fri, 2003-12-12 at 02:42, hzqbbc wrote: >> >>> i set LANG=en_US or LANG=en_US.UTF-8 or LANG=zh_CN and so on, but utf-8 >>> decode did not work still :-~( >> >> >> You should check to see what LANG is set to at the command line, and >> then set the same in your script with code like : >> $ENV{'LANG'} = "whatever"; >> eval "use Encode"; >> >>> And does perl modules need special handle to support utf-8 decode >>> correctly? >>> Hmmm.. it's strange, php works just very good, but perl doesn't. >>> Is there any successful implemention or sample code to encode/decode >>> 8bit >>> words under Webmin ?????? Thanks a lot.. >> >> >> I've actually tried to explicitly avoid encoding/decoding myself :-) >> - Jamie > > > Anyway, thank you very much, jamie! :) |