[Ironruby-core] Accessing a Module's Classes from C# with dynamic

2011-01-13 Thread Joshua M.
Hey guys. I am currently experimenting with IronRuby as an extensibility solution for my application. However, I have hit a roadblock. What I would like to do is call Runtime.UseFile("script.rb"), then access a global module in the script, and instantiate a specific class in that module. Here i

Re: [Ironruby-core] Encoding problem

2011-01-13 Thread Albert-Jan Pieter Nijburg
Hey, I found out that if I put nothing at the top and I do this: puts "\x89" it puts "ë" if I put the #Encoding: UTF-8 at the top this happens. J ëmscorlib:0:in `Throw': Unable to translate bytes [89] at index -1 from specifie d code page to Unicode. (System::Text::DecoderFallb

Re: [Ironruby-core] Encoding problem

2011-01-13 Thread Dezso Zoltan
Hi, > warning: variable $KCODE is no longer effective This means that you are in 1.9 mode :) In that case there are two things you could try: 1) set the encoding at the top of the file in the form of the comment: # encoding: UTF-8 2) force an encoding on the string(s) in question with the method

Re: [Ironruby-core] Encoding problem

2011-01-13 Thread Albert-Jan Pieter Nijburg
I Just found this: # puts "patiënt" which outputs: pati´┐¢nt It doesn’t crash anymore J Van: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] Namens Dezso Zoltan Verzonden: donderdag 13 januari 2011 14:52 Aan: ironruby-core@rubyforge.org Onderwerp: R

Re: [Ironruby-core] Encoding problem

2011-01-13 Thread Albert-Jan Pieter Nijburg
Hey Zaki, WARNING: YAML.add_builtin_type is not implemented unknown:0: warning: variable $KCODE is no longer effective tabaco.rb:11:in `puts': character U+00EB can't be encoded in US-ASCII (Encoding: :InvalidByteSequenceError) from tabaco.rb:11 Too bad.. thanks though. I'll have

Re: [Ironruby-core] Encoding problem

2011-01-13 Thread Dezso Zoltan
Hi, I don't really know the solution to your question, but this might help: ë is Unicode U+00EB, which is 0xC3AB in UTF-8 (so we are dealing with unicode rather than utf-8, which I assume is because IronRuby uses the immutable .NET strings internally with Unicode encoding). The errors are expect

[Ironruby-core] Encoding problem

2011-01-13 Thread Albert-Jan Pieter Nijburg
Hi Guys, My boss thought it would be cool to use "ë" in an sql tablename, many of you will want to shoot her now J. But now I did find something weird, I can't even print "ë". It says: tabaco.rb:16:in `puts': character U+00EB can't be encoded in US-ASCII (Encoding::InvalidByteSequ