Iconv platform difference

P

ProzakLord

Hi all,

Relatively new to Ruby as in 2 weeks so this may be dead obvious but
have not found any results in my searches

I use the net/http to get a bit of xml from a website that I put in
@doc.
The xml is ISO-5589-1 encoded so on windows I have to run an
Iconv.conv(@ doc.encoding,"UTF-8",strFromXml)
now when I run the same script on "Linux ruby 1.8.6 (2007-09-24
patchlevel 111) [x86_64-linux]"
The characters appear garbled. For the characters to be clear I need
to take out the Iconv call.

Is there a way of detecting what is the platforms character encoding
so that I can skip the conversion step if they match?

Thanking you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top