<div>Hi,</div>
<div> </div>
<div>Similar to what Bertil suggested for Xmerl, you can achieve this in Erlsom by adding a clause </div>
<div><font face="courier new,monospace"></font> </div>
<div><font face="courier new,monospace">"windows-1252" -> 'iso-8859-1';  %% note: this is actually introducing a bug </font></div>
<div><font face="courier new,monospace">                                 %% in order to work around a problem!</font></div>
<div> </div>
<div>to the case statement in encoding_type() in erlsom_lib.erl. </div>
<div> </div>
<div>I would be interested to know why you think it will be necessary to replace it by a C++ port. It seems to me that it will be complicating things considerably. What are the requirements that make this necessary? What properties should an Erlang XML parser have?
</div>
<div> </div>
<div>Regards,</div>
<div>Willem<br><br> </div>
<div><span class="gmail_quote">On 1/7/08, <b class="gmail_sendername">Zvi</b> <<a href="mailto:exta7@walla.com">exta7@walla.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>XML generated by closed-source 3rd party Windows server (if it was generated<br>by me, then it was encoded in utf-8).
<br>I asking here questions from Erlang domain, not the obvious & ugly common<br>sence solutions, like reading the entire file into memory, changing the<br>encoding string and only then feeding it into xmerl. (the problem only that
<br>this XML can be quite big, like 0.5 MB and more).<br>Maybe xmerl has some option for forcing encoding, other than specified in<br>the <?xml?> PI?<br>Maybe there is some other XML parser like erlsom or expat driver, which
<br>supports windows-1252 encoding?<br>Anyway I using xmerl just for prototyping, the long term solution will be to<br>write C++ port, which will be doing all the XML processing and return Erlang<br>terms in either text or binary form, which can be read either by
<br>file:consult or binary_to_term on the Erlang side.<br><br>ZVi<br><br><br>Christian S wrote:<br>><br>> Why not ask yourself how to change your xml so it says iso-8859-1 as you<br>> say<br>> it should be doing?
<br>><br>> <a href="http://en.wikipedia.org/wiki/Garbage_In,_Garbage_Out">http://en.wikipedia.org/wiki/Garbage_In,_Garbage_Out</a><br>><br>> On Jan 7, 2008 5:22 PM, Zvi <<a href="mailto:exta7@walla.com">exta7@walla.com
</a>> wrote:<br>>><br>>> Bertil,<br>>><br>>> thanks for the reply.<br>>> Actually the charcter set used is always latin-1, but for some reason 3rd<br>>> party software call it windows-1252 . So if you can tell me, what I
<br>>> should<br>>> change in xmerl, so it will threat windows-1252 as Latin-1 .<br>> _______________________________________________<br>> erlang-questions mailing list<br>> <a href="mailto:erlang-questions@erlang.org">
erlang-questions@erlang.org</a><br>> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>><br>><br><br>--<br>View this message in context: 
<a href="http://www.nabble.com/Exception-in-xmerl%2C-when-pasing-XML-with-non-UTF8-character-set-tp14588326p14674437.html">http://www.nabble.com/Exception-in-xmerl%2C-when-pasing-XML-with-non-UTF8-character-set-tp14588326p14674437.html
</a><br>Sent from the Erlang Questions mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">
erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>