1) This is my environment values:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
I am running background process by calling the perl script.
Now I realised that after I have made changes to /etc/sysconfig/i18n, LC_CTYPE="en_US", I am able to see the correct result after running the script:
Wide character in print at ...
String: ¸§¹„¸¨¸¸« test
Verify: ¸§¹„¸¨¸¸« -- test
If I remove LC_CTYPE, this is the result:
String: ¸§¹„¸¨¸¸« test
Verify: ¸§¹„¸¨¸Â¸« -- test
Another thing puzzle me, even if I configure the LC_CTYPE="en_US". The output result is correct, however the background process when running the perl script still give me the wrong result. Is there a file to configure system wide LC_CTYPE??
I am not sure where could be the problem now?
Is it my system? environment?
Or is it my script but the $string variable output is correct, however the capture expression $1 is wrong.
did I miss something here?