[Wtr-general] unicode question
Charley Baker
charley.baker at gmail.com
Tue Oct 24 14:22:07 EDT 2006
You can try using the jcode library. Unicode support in Ruby is dicey
at best right now, but this should at least allow you to get the
unicode strings from your escape sequences:
$KCODE = 'UTF8'
require jcode
str = "\342\210\202x/\342\210\202y"
puts str
=> ∂x/∂y
On 10/24/06, Christian Kreutzer <herr.kreutzer at googlemail.com> wrote:
> Hi again,
>
> i think i finally figured out what the real problem is. While reading
> UTF-8 encoded files (and passing those unicode strings to watir) works
> fine. those *.properties files that we have to use for input use the
> unicode-escape encoding (\uxxxx) for unicode chars. The files are
> encoded in ASCII.
>
> python, javascript or java can handle this encoding but i dont know
> how use this in ruby. Since this unicode-escape encoding doesnt seem
> to be "real" utf-8 encoding the hints i got so far can't solve the
> problem.
>
> any ideas?
>
> Christian
>
> On 10/20/06, Chris McMahon <christopher.mcmahon at gmail.com> wrote:
> >
> >
> > >
> > > XSD::Charset.encoding = 'UTF8' <-- is there something to "require" in
> > > the script in order to get this working?
> >
> >
> > You might possibly need to install net-http2 for this, but I thought it was
> > part of Ruby....
> >
> > http://dev.ctor.org/download/http-access-2_0_6.tar.gz
> >
> >
> >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> >
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
More information about the Wtr-general
mailing list