RubyDotNet Unicode string conversion

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,138
Messages
2,570,803
Members
47,349
Latest member
jojonoy597

Latest Threads

Top