[1.7] Proposal: the filename encoding in C locale uses UTF-8 instead of SO/UTF-8
Lenik
lenik@bodz.net
Sat May 16 05:17:00 GMT 2009
(This mail is encoded in utf-8)
After tested with 1.7.0-48, many problems are eliminated.
But cygpath doesn't return good pathnames, see:
1, Get absolute path of current directory:
C:\Profiles\Shecti\æ¡é¢> set LANG=zh_CN.GBK& cygpath -am .
C:/Profiles/Shecti/æ¡é¢ (good)
C:\Profiles\Shecti\æ¡é¢> set LANG=zh_CN.GBK& cygpath -au .
/mnt/c/Profiles/Shecti/æ¡é¢/ (good)
C:\Profiles\Shecti\æ¡é¢> set LANG=zh_CN.UTF-8& cygpath -am .
C:/Profiles/Shecti/ââââ (bad)
C:\Profiles\Shecti\æ¡é¢> set LANG=zh_CN.UTF-8& cygpath -au .
/mnt/c/Profiles/Shecti/æ¡é¢/ (good)
C:\Profiles\Shecti\æ¡é¢> set LANG=C& cygpath -am .
C:/Profiles/Shecti/ââââ (bad)
C:\Profiles\Shecti\æ¡é¢> set LANG=C& cygpath -au .
/mnt/c/Profiles/Shecti/æ¡é¢/ (good)
Conclusion:
1.1 only GBK works for `cygpath -am .' (also -aw)
1.2 all work for `cygpath -au .'
2, Get absolute path of specified path
C:\Profiles\Shecti\æ¡é¢>set LANG=zh_CN.GBK& cygpath -am C:\Profiles
\Shecti\æ¡é¢
C:/Profiles/Shecti/å¦å²æ½° (bad)
C:\Profiles\Shecti\æ¡é¢>set LANG=zh_CN.GBK& cygpath -au C:\Profiles
\Shecti\æ¡é¢
/mnt/c/Profiles/Shecti/å¦å²æ½° (bad)
C:\Profiles\Shecti\æ¡é¢>set LANG=zh_CN.UTF-8& cygpath -am
C:\Profiles\Shecti\æ¡é¢
C:/Profiles/Shecti/ââââ (bad)
C:\Profiles\Shecti\æ¡é¢>set LANG=zh_CN.UTF-8& cygpath -au
C:\Profiles\Shecti\æ¡é¢
/mnt/c/Profiles/Shecti/æ¡é¢ (good)
C:\Profiles\Shecti\æ¡é¢>set LANG=C& cygpath -am C:\Profiles\Shecti\æ¡é¢
C:/Profiles/Shecti/ââââ (bad)
C:\Profiles\Shecti\æ¡é¢>set LANG=C& cygpath -au C:\Profiles\Shecti\æ¡é¢
/mnt/c/Profiles/Shecti/æ¡é¢ (good)
Conclusion:
2.1 none works for `cygpath -am PathContainsNonascii'
2.2 GBK doesn't work for `cygpath -au PathContainsNonascii'
Now the problem is, I must use GBK for 1.1, and I cannot use GBK for
2.2. and no more choice. -_-||...
Lenik
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list