A
Aleksei Guzev
Hi,
As far as I know Ruby 1.8.0 is not Unicode.
..NET uses Unicode for Strings. Running in IRB
require 'dotnet'
loadLibrary 'System.IO'
dir = DirectoryInfo.new 'd:\somedir'
dir.getFiles().each{ |f| print "#{f.name}\n" }
produces file list, but filenames with cyrillic letters are in wrong
encoding.
I know the problem is Russians use more than one encoding.
I hope the issue could be resolved with using of
System.Text.Encoding.Default instead of default value for encoding in
string conversion functions. I do not know why Microsoft made them differ
If the authors of RubyDotNet would point the code in the module, I'd try
to fix this.
Aleksei Guzev
As far as I know Ruby 1.8.0 is not Unicode.
..NET uses Unicode for Strings. Running in IRB
require 'dotnet'
loadLibrary 'System.IO'
dir = DirectoryInfo.new 'd:\somedir'
dir.getFiles().each{ |f| print "#{f.name}\n" }
produces file list, but filenames with cyrillic letters are in wrong
encoding.
I know the problem is Russians use more than one encoding.
I hope the issue could be resolved with using of
System.Text.Encoding.Default instead of default value for encoding in
string conversion functions. I do not know why Microsoft made them differ
If the authors of RubyDotNet would point the code in the module, I'd try
to fix this.
Aleksei Guzev