hi Charley,

thanks for your reply. Your example works fine so far but it doesn't
solve our problem. In our case the unicode chars are escaped like this
"\u00fc" (should be a german ue umlaut)

I can use this escaped chars in Python for example:

>>> print u"\u00fc"
ü

In Ruby i get the following result:

$KCODE = 'UTF8'
require jcode

str = "\u00fc"
puts str
=> u00fc

Christian

On 10/24/06, Charley Baker <[EMAIL PROTECTED]> wrote:
> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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@rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/wtr-general
> > >
> > >
> > _______________________________________________
> > Wtr-general mailing list
> > Wtr-general@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to