This project is archived and is in readonly mode.
Fix UTF-8 output for Builder
Reported by DHH | November 23rd, 2008 @ 12:14 PM
The following should not have been escaped. According to Sam Ruby there's a patch for the latest Builder, but Jim Weirich haven't released a new version with it. As soon as that version is out we should upgrade the bundle.
>> Post.first.title => "Iñtërnâtiônàl" >> b= Builder::XmlMarkup.new; b.instruct!(:xml, :encoding => "UTF-8"); b.title(Post.first.title) => "<?xml version=\"1.0\" encoding=\"UTF-8\"?><title>Iñtërnâtiônàl</title>" >> $KCODE => "UTF8"
Comments and changes to this ticket
- Tag set to builder, fastxs
After verifying that a test containing DHH's sample above passes using the GitHub version of Builder (yay!), I can also verify that Jeremy is right that fast_xs will continue to escape those values (boo!).
I thought this might be useful information for others that find there way here, at the very least. I plan on pitching in a little bit here, but we'll see if there are any tangible results.