I'll give that a try, thanks.
On Tue, Mar 23, 2010 at 3:13 PM, Shay Friedman wrote:
> Maybe the .NET's System.Text.Encoding class:
>
> >>> bytes = Encoding.convert(Encoding.ASCII, Encoding.UTF8,
> Encoding.ASCII.get_bytes("Hello".to_clr_string))
> => [72 (Byte), 101 (Byte), 108 (Byte), 108 (Byte)
Maybe the .NET's System.Text.Encoding class:
>>> bytes = Encoding.convert(Encoding.ASCII, Encoding.UTF8,
Encoding.ASCII.get_bytes("Hello".to_clr_string))
=> [72 (Byte), 101 (Byte), 108 (Byte), 108 (Byte), 111 (Byte)]
>>> Encoding.UTF8.get_string(bytes)
=> 'Hello'
Shay.
---
I'm trying to use the waz-storage gem for talking to Windows Azure storage
services, but it uses kconv and there's a problem with the toutf8 mix-in
method, which is trying to call NKF.nkf, which is not defined.
Repro:
irb(main):001:0> require 'kconv'
=> true
irb(main):002:0> "foo".toutf8
NoMethod