Hi! I''m struggling with a weird error - I have a string filled up with binary data, and when I ask .length to it, CLR raises an exception telling it could not convert from specified charset to unicode. Is there any place to inform ironruby to use the "none" encoding for such strings? (as like MRI 1.8 works) - It''s a bug, a feature? IronRuby 1.0 (.net 2.0) Thanks! Douglas Campos (qmx) douglas at theros.info +55 11 6762 5959
Could you please send a snippet of code or a file that demonstrates the problem? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Douglas Campos Sent: Monday, June 28, 2010 9:23 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] MutableString issues on IronRuby Hi! I''m struggling with a weird error - I have a string filled up with binary data, and when I ask .length to it, CLR raises an exception telling it could not convert from specified charset to unicode. Is there any place to inform ironruby to use the "none" encoding for such strings? (as like MRI 1.8 works) - It''s a bug, a feature? IronRuby 1.0 (.net 2.0) Thanks! Douglas Campos (qmx) douglas at theros.info +55 11 6762 5959 _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Thanks for the fast response https://gist.github.com/cb0450e5b2cb714a0ce8 HTH On Jun 29, 2010, at 1:27 AM, Tomas Matousek wrote:> Could you please send a snippet of code or a file that demonstrates the problem? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Douglas Campos > Sent: Monday, June 28, 2010 9:23 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] MutableString issues on IronRuby > > Hi! > > I''m struggling with a weird error - I have a string filled up with binary data, and when I ask .length to it, CLR raises an exception telling it could not convert from specified charset to unicode. Is there any place to inform ironruby to use the "none" encoding for such strings? (as like MRI 1.8 works) - It''s a bug, a feature? > > IronRuby 1.0 (.net 2.0) > > Thanks! > > > Douglas Campos (qmx) > douglas at theros.info > +55 11 6762 5959 > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-coreDouglas Campos (qmx) douglas at theros.info +55 11 6762 5959
Douglas Campos wrote:> Hi! > > I''m struggling with a weird error - I have a string filled up with > binary data, and when I ask .length to it, CLR raises an exception > telling it could not convert from specified charset to unicode. Is there > any place to inform ironruby to use the "none" encoding for such > strings? (as like MRI 1.8 works) - It''s a bug, a feature? > > IronRuby 1.0 (.net 2.0) > > Thanks! > > > Douglas Campos (qmx) > douglas at theros.info > +55 11 6762 5959I have also had some issues with MutableString not support the IConvertable Interface used by the Convert C# class. -- Posted via http://www.ruby-forum.com/.