[erlang-questions] Exporting UTF-8 strings from xmerl

Mikkel Jensen dirtyundies@REDACTED
Mon Dec 4 15:30:19 CET 2006


> It is not possible to export UTF-8 decoded characters.

I guess xmerl does not do this automatically.
What I've done instead is to create a new callback module which uses
the xmerl_ucs:to_utf8/1 method to decode the unicode values.

'#text#'(Text) -> xmerl_lib:export_text(xmerl_ucs:to_utf8(Text)).

Not sure if this is the best way to do it, but it seems to work. If
anyone else has a better idea i would very much like to hear it...

- Mikkel



More information about the erlang-questions mailing list