diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-10-17 12:49:42 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-10-17 12:49:42 +0200 |
commit | b1a2b7652735d5385b4e765d8ef71b640861f77c (patch) | |
tree | 00b55bcc13b80187889b6e4f6857d217d52ebf73 | |
parent | 32729cab75325de58bf127e6e8836348071b8682 (diff) | |
parent | 8cddd5600870c64f27f555144804a1ff4104f7e6 (diff) | |
download | otp-b1a2b7652735d5385b4e765d8ef71b640861f77c.tar.gz otp-b1a2b7652735d5385b4e765d8ef71b640861f77c.tar.bz2 otp-b1a2b7652735d5385b4e765d8ef71b640861f77c.zip |
Merge branch 'maint'
-rw-r--r-- | lib/erl_docgen/src/docgen_edoc_xml_cb.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl index 4f3af1f767..13ff0a139d 100644 --- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl +++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl @@ -111,7 +111,16 @@ root_attributes(Element, Opts) -> Enc -> Enc end, - [#xmlAttribute{name=encoding, value=Encoding}]. + [#xmlAttribute{name=encoding, value=reformat_encoding(Encoding)}]. + +%% epp:default_encoding/0 returns 'utf8' +reformat_encoding(utf8) -> "UTF-8"; +reformat_encoding(List) when is_list(List) -> + case string:to_lower(List) of + "utf8" -> "UTF-8"; + _ -> List + end; +reformat_encoding(Other) -> Other. layout_chapter(#xmlElement{name=overview, content=Es}) -> Title = get_text(title, Es), |