On 19jun, 2010, at 16:34 , Magnus Holm wrote: > I think the problem is that Builder don't know that you're using > UTF-8, so it's just doing the "safest" thing and just escapes > everything. But this shouldn't really be a "problem", since the parser > should handle it and treat every á as á.
yes, but don't know why the parser doesn't treat it, I'll try to find another XML parser ... thanks, r. > > // Magnus Holm > > > > On Sat, Jun 19, 2010 at 15:53, Raimon Fernandez <co...@montx.com> wrote: >> Hi all, >> >> On 18jun, 2010, at 17:51 , Magnus Holm wrote: >> >>> This shouldn't be a problem, because that's the way to add non-ASCII >>> characters to XML documents. A proper XML parser should handle it... >> >> But in this case, it's an ASCII á, well, the extended ASCII, and all .xml >> files that I've created never added this encoded, always the char itself, >> like à á ç ñ >> >> I'm using the TBMXML parser http://www.tbxml.co.uk/TBXML/TBXML_Free.html >> >> And because the xml file has the encoding="UTF-8" I suppose that those chars >> can be added as they are without encoding. >> >> And also I'm using other C libraries in other projects that they do not >> escape those chars ... >> >> Thanks! >> >> regards, >> >> r. >> >> >>> >>> // Magnus Holm (from my phone) >>> >>> On Friday, June 18, 2010, Raimon Fernandez <co...@montx.com> wrote: >>>> Hi again, >>>> >>>> I know this is more related to builder than to camping, but not sure where >>>> to ask for it ... >>>> >>>> :-) >>>> >>>> >>>> My app receives .xml file from some different sources, and all of them, >>>> except the camping one, are formatted like this: >>>> >>>> >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <person> >>>> <name>Jim Fernández</name> >>>> <phone>555-1234</phone> >>>> </person> >>>> >>>> >>>> but camping is formatting like this: >>>> >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <person> >>>> <name>Jim Fernández</name> >>>> <phone>555-1234</phone> >>>> </person> >>>> >>>> >>>> The main difference is the encoding for some chars: >>>> >>>> á => á >>>> >>>> I can't find in builder how to write values without escaping them ... >>>> >>>> thanks, >>>> >>>> r. >>>> >>>> On 17jun, 2010, at 21:04 , Magnus Holm wrote: >>>> >>>>> And if you want this XML: >>>>> >>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>> <posts> >>>>> <post> >>>>> <title>Hiya</title> >>>>> <content>Hey</content> >>>>> </post> >>>>> </posts> >>>>> >>>>> You have this view: >>>>> >>>>> module App::Views >>>>> def posts(xml) >>>>> xml.posts do >>>>> @posts.each do |post| >>>>> xml.post do >>>>> xml.title(post.title) >>>>> xml.content(post.content) >>>>> end >>>>> end >>>>> end >>>>> end >>>>> end >>>> >>>> >>>> _______________________________________________ >>>> Camping-list mailing list >>>> Camping-list@rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/camping-list >>>> >>> >>> -- >>> // Magnus Holm >>> _______________________________________________ >>> Camping-list mailing list >>> Camping-list@rubyforge.org >>> http://rubyforge.org/mailman/listinfo/camping-list >> >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list@rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > _______________________________________________ > Camping-list mailing list > Camping-list@rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list _______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list