From 894d0f58cf3b0957ccb6c35d812d792412a98556 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 7 Mar 2011 15:17:43 +0100 Subject: Add encoding when parsing Wiki text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EDoc used to fail on strings such as "δεφ". Thanks to Richard Carlsson. --- lib/edoc/src/edoc_wiki.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/edoc') diff --git a/lib/edoc/src/edoc_wiki.erl b/lib/edoc/src/edoc_wiki.erl index e4a3d74734..b36aaae6ce 100644 --- a/lib/edoc/src/edoc_wiki.erl +++ b/lib/edoc/src/edoc_wiki.erl @@ -82,7 +82,8 @@ parse_xml(Data, Line) -> parse_xml_1(Text, Line) -> Text1 = "" ++ Text ++ "", - case catch {ok, xmerl_scan:string(Text1, [{line, Line}])} of + Options = [{line, Line}, {encoding, "iso-8859-1"}], + case catch {ok, xmerl_scan:string(Text1, Options)} of {ok, {E, _}} -> E#xmlElement.content; {'EXIT', {fatal, {Reason, L, _C}}} -> -- cgit v1.2.3