aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edoc/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-03-07 15:17:43 +0100
committerHans Bolinder <[email protected]>2011-03-07 15:17:43 +0100
commit894d0f58cf3b0957ccb6c35d812d792412a98556 (patch)
tree71fbb3398c87b9d7ce16d0d1ce2da2af6aa4f45a /lib/edoc/src
parentf85c79166c0fcf39eaab62e39f392aa7ce83c9bf (diff)
downloadotp-894d0f58cf3b0957ccb6c35d812d792412a98556.tar.gz
otp-894d0f58cf3b0957ccb6c35d812d792412a98556.tar.bz2
otp-894d0f58cf3b0957ccb6c35d812d792412a98556.zip
Add encoding when parsing Wiki text
EDoc used to fail on strings such as "���". Thanks to Richard Carlsson.
Diffstat (limited to 'lib/edoc/src')
-rw-r--r--lib/edoc/src/edoc_wiki.erl3
1 files changed, 2 insertions, 1 deletions
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 = "<doc>" ++ Text ++ "</doc>",
- 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}}} ->