This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [1.7] Proposal: the filename encoding in C locale uses UTF-8 instead of SO/UTF-8
(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/