aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edoc/src/edoc.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2012-12-03 12:34:04 +0100
committerHans Bolinder <[email protected]>2013-01-02 10:15:17 +0100
commitb941448860fc2220695d04d8b8806509cb053b5a (patch)
tree3ec103a7bd6791eedac019d536649a3f459e0567 /lib/edoc/src/edoc.erl
parent300c5466a7c9cfe3ed22bba2a88ba21058406402 (diff)
downloadotp-b941448860fc2220695d04d8b8806509cb053b5a.tar.gz
otp-b941448860fc2220695d04d8b8806509cb053b5a.tar.bz2
otp-b941448860fc2220695d04d8b8806509cb053b5a.zip
[edoc] Introduce Unicode support for source files
Diffstat (limited to 'lib/edoc/src/edoc.erl')
-rw-r--r--lib/edoc/src/edoc.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/edoc/src/edoc.erl b/lib/edoc/src/edoc.erl
index 544465b14a..5a599e6e97 100644
--- a/lib/edoc/src/edoc.erl
+++ b/lib/edoc/src/edoc.erl
@@ -120,7 +120,8 @@ file(Name, Options) ->
Suffix = proplists:get_value(file_suffix, Options,
?DEFAULT_FILE_SUFFIX),
Dir = proplists:get_value(dir, Options, filename:dirname(Name)),
- edoc_lib:write_file(Text, Dir, BaseName ++ Suffix).
+ Encoding = [{encoding, edoc_lib:read_encoding(Name, [])}],
+ edoc_lib:write_file(Text, Dir, BaseName ++ Suffix, '', Encoding).
%% TODO: better documentation of files/1/2, packages/1/2, application/1/2/3