File 0504-Add-info-about-compiler-latin1-support-without-encod.patch of Package erlang

From 4c38808519de29bcea795d0218209bd5d82fa299 Mon Sep 17 00:00:00 2001
From: Kjell Winblad <kjellwinblad@gmail.com>
Date: Fri, 18 Oct 2019 16:53:52 +0200
Subject: [PATCH] Add info about compiler latin1 support without encoding
 string removal

This commit adds information to the warning message that appears when
the compiler detects a non-utf-8 encoded source files without an
encoding string in the beginning of the file. Now, the message
contains information that support for latin1 encoded source file
without an encoding string will be removed in Erlang/OTP 24.
---
 lib/compiler/src/compile.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 6cbbc33a83..fd5233d379 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -333,7 +333,7 @@ format_error({bad_return,Pass,Reason}) ->
 format_error({module_name,Mod,Filename}) ->
     io_lib:format("Module name '~s' does not match file name '~ts'", [Mod,Filename]);
 format_error(reparsing_invalid_unicode) ->
-    "Non-UTF-8 character(s) detected, but no encoding declared. Encode the file in UTF-8 or add \"%% coding: latin-1\" at the beginning of the file. Retrying with latin-1 encoding.".
+    "Non-UTF-8 character(s) detected, but no encoding declared. Encode the file in UTF-8 or add \"%% coding: latin-1\" at the beginning of the file. Note: The compiler will remove support for latin-1 encoded source files without the \"%% coding: latin-1\" string at the beginning of the file in Erlang/OTP 24! Retrying with latin-1 encoding.".
 
 format_error_reason({Reason, Stack}) when is_list(Stack) ->
     StackFun = fun
-- 
2.16.4

openSUSE Build Service is sponsored by