aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-03-18 09:35:43 +0100
committerHans Bolinder <[email protected]>2015-03-18 09:35:43 +0100
commit1db419fc261faaab0830af9c0499499f03fad33b (patch)
tree76aa8f7e0d22dc37c541c8a6a4d2e37d04eea47d
parente74c4459c0ff9ab7504117a85b2634d5dd7df524 (diff)
parent1d1a5db5134f3eb1d64b36adf6ccd9f11d29ea65 (diff)
downloadotp-1db419fc261faaab0830af9c0499499f03fad33b.tar.gz
otp-1db419fc261faaab0830af9c0499499f03fad33b.tar.bz2
otp-1db419fc261faaab0830af9c0499499f03fad33b.zip
Merge branch 'hb/tools/unicode_fix/OTP-12567' into maint
* hb/tools/unicode_fix/OTP-12567: tools: Fix a Unicode bug in the tags module
-rw-r--r--lib/tools/src/tags.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tools/src/tags.erl b/lib/tools/src/tags.erl
index e3cc51cdb2..e25db2eb1b 100644
--- a/lib/tools/src/tags.erl
+++ b/lib/tools/src/tags.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2015. 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
@@ -297,15 +297,16 @@ word_char(_) -> false.
%% Check the options `outfile' and `outdir'.
open_out(Options) ->
+ Opts = [write, {encoding, unicode}],
case lists:keysearch(outfile, 1, Options) of
{value, {outfile, File}} ->
- file:open(File, [write]);
+ file:open(File, Opts);
_ ->
case lists:keysearch(outdir, 1, Options) of
{value, {outdir, Dir}} ->
- file:open(filename:join(Dir, "TAGS"), [write]);
+ file:open(filename:join(Dir, "TAGS"), Opts);
_ ->
- file:open("TAGS", [write])
+ file:open("TAGS", Opts)
end
end.