[erlang-questions] character encoding and xmerl

Martin Dimitrov mrtndimitrov@REDACTED
Thu Jan 5 10:25:06 CET 2012


In our app we upload a XML file through simple form. The page is encoded
in UTF-8 as well as the file.

YAWS gathers the parts of the file, flattens them and sends them to
xmerl. The XML is scanned through xmerl_scan:string with {encoding,
"utf-8"}. When I dump the string the Cyrillic word продукт is printed as

After the scan, the Cyrillic word is printed as
1087,1088,1086,1076,1091,1082,1090 which, according to my believes, is
the correct Unicode representation.

The problem is when our internal structures are exported to XML. Then
trying to scan the XML again, xmerl reports:


Thanks in advance,


More information about the erlang-questions mailing list