On Feb 12, 6:32 pm, “Bill K.” [email protected] wrote:
That leads me to suspect maybe unicode is supported on the
If so, my next question would be, which encoding format should
the filename string be in when passed to, say, File.open() ?
Since File.open isn’t redefined in win32-file, it won’t make a
difference one way or the other.
However, in general I would say that Unicode support is even worse
than I originally thought (though, no worse than stock Ruby). What I’m
considering is to seriously rework windows-pr such that I explicitly
define the ANSI and Wide versions of every function, then do something
like this in the source:
if $KCODE == ‘UTF8’
By using the -Ku option (or just setting $KCODE directly) you would
get the wide version. Otherwise, you get the ANSI version. This seemed
to work pretty well in the few tests that I’ve done.
The most difficult part for authors using these functions would be to
remember to convert strings to wide character versions first, before
passing them to the functions. I provided a couple helper methods for
that - multi_to_wide and wide_to_multi, that handles the most typical