B
Bill Kelly
From: "Bill Kelly said:For best 8-bit compatibility you'll want to encode to Windows1252.
Hmm, I take it back; even for 8-bit it appears slightly more complicated
on windows...
Apparently depending on AreFileApisANSI() one would encode to
GetACP() vs. GetOEMCP()
Ruby 1.9.1 is smart enough to handle this automatically (see:
rb_filesystem_encoding() in encoding.c)
But anyway this is all still referring to 8-bit code pages and still won't
help for chinese (etc.) characters anyway...
* * *
So, again, if you absolutely need to handle unicode paths on
windows prior to ruby 1.9.2, and you don't have the option of
writing your own ruby C extension, the I think trying to call
wide-character functions like _wopen() via ruby's Win32API
module may be the only option.
Regards,
Bill