diff options
author | Hans Bolinder <[email protected]> | 2012-12-03 12:36:49 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2013-01-02 10:15:17 +0100 |
commit | 7f00144160c8e0202cfe7368830bdd472bc73505 (patch) | |
tree | 1ee6a05d1149037d90ccfdad289bcc0b2d593af1 /lib/erl_docgen/priv | |
parent | b941448860fc2220695d04d8b8806509cb053b5a (diff) | |
download | otp-7f00144160c8e0202cfe7368830bdd472bc73505.tar.gz otp-7f00144160c8e0202cfe7368830bdd472bc73505.tar.bz2 otp-7f00144160c8e0202cfe7368830bdd472bc73505.zip |
[erl_docgen] Update due to introduction of Unicode
Diffstat (limited to 'lib/erl_docgen/priv')
-rwxr-xr-x | lib/erl_docgen/priv/bin/xml_from_edoc.escript | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/erl_docgen/priv/bin/xml_from_edoc.escript b/lib/erl_docgen/priv/bin/xml_from_edoc.escript index 2cb81be1be..65a580dca2 100755 --- a/lib/erl_docgen/priv/bin/xml_from_edoc.escript +++ b/lib/erl_docgen/priv/bin/xml_from_edoc.escript @@ -2,7 +2,7 @@ %% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2011. All Rights Reserved. +%% Copyright Ericsson AB 2010-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -100,10 +100,12 @@ module(File, Args) -> users_guide(File, Args) -> case filelib:is_regular(File) of true -> + Enc = epp:read_encoding(File, [{in_comment_only, false}]), + Encoding = [{encoding, Enc} || Enc =/= none], Opts = [{def, Args#args.def}, {app_default, "OTPROOT"}, {file_suffix, Args#args.suffix}, - {layout, Args#args.layout}], + {layout, Args#args.layout}] ++ Encoding, Env = edoc_lib:get_doc_env(Opts), @@ -115,7 +117,7 @@ users_guide(File, Args) -> Text = edoc_lib:run_layout(F, Opts), OutFile = "chapter" ++ Args#args.suffix, - edoc_lib:write_file(Text, ".", OutFile); + edoc_lib:write_file(Text, ".", OutFile, '', Encoding); false -> io:format("~s: not a regular file\n", [File]), usage() |