Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0388-Encode-generated-dependency-files-in-UTF-8...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0388-Encode-generated-dependency-files-in-UTF-8.patch of Package erlang
From 4b6006a289b03bf4dd3db6888ad887477cf56fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Fri, 19 Feb 2021 09:44:39 +0100 Subject: [PATCH] Encode generated dependency files in UTF-8 If the dependency output (generated when the compiler is invoked with the `makedep` option) contained non-latin1 characters, the compiler would crash. To avoid the crash, encode the output in UTF-8. --- lib/compiler/doc/src/compile.xml | 1 + lib/compiler/src/compile.erl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index e41967ca35..fb24ce60d3 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -237,6 +237,7 @@ <c>binary</c> is set, nothing is written and the rule is returned in <c>Binary</c>. </p> + <p>The output will be encoded in UTF-8.</p> <p>For example, if you have the following module: </p> <code> diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 5078818646..d375553fcb 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -1309,7 +1309,7 @@ makedep(Code0, #compile{ifile=Ifile,ofile=Ofile,options=Opts}=St) -> true -> MainRule ++ PhonyRules; _ -> MainRule end, - Code = iolist_to_binary([Makefile,"\n"]), + Code = unicode:characters_to_binary([Makefile,"\n"]), {ok,Code,St}. makedep_add_headers(Ifile, [{attribute,_,file,{File,_}}|Rest], -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor