Cygwin util replacing win-util for UCS-2 -> UTF-8; utf8 support (redux)

Linda Walsh cygwin@tlinx.org
Tue Nov 14 22:37:00 GMT 2006


Right now, to convert an NT text file in UCS-2 format, in bash,
I use:

mode.com codepage select=65001
reg export hklm\\software hklm-sw.reg5
cmd /c type hklm-sw.reg5  > hklm-sw-utf8.txt

It isn't perfect -- any UCS-2 entries that are not valid UTF-16
won't get converted properly (since they don't represent a valid
text string).

You can convert to other codepages, of course, by selecting
an alternate code page with "mode".

What ever happened to the UTF-8 compatibility layer that
someone wrote a patch for a while back?  I don't recall seeing
the issue discussed on the list.  I heard mention that it might
have been on another list, but it seems as a cygwin issue, it
might have gotten more people interested in the discussion had it
been discussed here.

It's troublesome to have filenames that are valid under
windows be inaccessible with cygwin utils (like rsync).
It's a pain that I can't rsync my music directory (which
contains World-beat music) to my mp3 player without getting
multiple "file not found" errors. (due to rsync not
understanding International filenames).

Can't even "ls" in some directories:

/m/World/Omar/Süleyan the Magnificient> ll -gG
ls: 01 Istanbul'dan Görüntüler.mp3: No such file or directory
ls: 17 Istanbul'dan Görüntüler (Reprise).mp3: No such file or directory
ls: 10 Süleyman?n Öyküsü.mp3: No such file or directory
ls: 02 Gögü Yedi Kat?.mp3: No such file or directory
ls: 08 Topkap?n?n Bahçesi.mp3: No such file or directory
ls: 11 Teke Z?plamas?.mp3: No such file or directory
ls: 13 Segâh Pesrev.mp3: No such file or directory
ls: 15 Hicaz Pesrev.mp3: No such file or directory
ls: 05 Ussak Semai.mp3: No such file or directory
total 23088
-rw-r----- 1 2447657 Mar  8  2003 03 Egeli Gemici.mp3
-rw-r----- 1 3253625 Mar  8  2003 04 Aya Sofya.mp3
-rw-r----- 1 1311799 Mar  8  2003 06 Nihâvend Fantazi.mp3
-rw-r----- 1 1733289 Mar  8  2003 07 Kuzeydeki Köy.mp3
-rw-r----- 1 6059476 Mar  8  2003 09 Rast Medhal.mp3
-rw-r----- 1 3791275 Mar  8  2003 12 Mevlânâ.mp3
-rw-r----- 1 1371208 Mar  8  2003 14 Hicaz Taksimi.mp3
-rw-r----- 1 3654052 Mar  8  2003 16 Makber.mp3
/m/World/Omar/Süleyan the Magnificient>


--
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