aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-10-17 12:49:19 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-10-17 12:49:19 +0200
commit8cddd5600870c64f27f555144804a1ff4104f7e6 (patch)
treee3efaa1dd9c675f4bad89155b281e8aa29f91507
parent74adb848a89eb9eb4be52e8d46e1c07e52e65f20 (diff)
parent9f9f63e3919a5703c3dd05948b2990df608cf9f5 (diff)
downloadotp-8cddd5600870c64f27f555144804a1ff4104f7e6.tar.gz
otp-8cddd5600870c64f27f555144804a1ff4104f7e6.tar.bz2
otp-8cddd5600870c64f27f555144804a1ff4104f7e6.zip
Merge branch 'egil/erl_docgen/reformat-docgen-encoding/OTP-13971' into maint
* egil/erl_docgen/reformat-docgen-encoding/OTP-13971: Reformat docgen xml encoding
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl11
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),