Setting the output encoding in REXML

F

Francis Hwang

I'm sure this is really obvious, but I can't find it in either the
REXML tutorial or the RDoc. How do I set the encoding for output? I
tried doing this:

doc.xml_decl.encoding = 'ISO-8859-1'

which sets the "encoding" attribute in the declaration correctly. But
it doesn't actually do turn, say, \251 into ©, which is what I
want.

Francis
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top