From bc3821bb3b19646311d36c82a13b4ce5afea3508 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 13 Oct 2017 14:36:23 -0700 Subject: [PATCH] locale: No warning for non-symbolic character (bug 22295) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In "Is it OK to write ASCII strings directly into locale source files?" https://sourceware.org/ml/libc-alpha/2017-07/msg00807.html there is universal consensus that we do not have to keep writing symbolic characters in locale files. Ulrich Drepper's historical comment was that symbolic characters were used for the eventuality of converting the source files to any encoding system. Fast forward to today and UTF-8 is the standard. So the requirement of is hard to justify. Zack Weinberg's excellent scripts are coming along we can use these to find instances of human errors in the scripts: https://sourceware.org/ml/libc-alpha/2017-07/msg00860.html https://sourceware.org/ml/libc-alpha/2017-08/msg00136.html It still won't be easy to distinguish from i for í, but that's still the case for characters which humans can't read either. Since we all agreed that we should be able to use non-symbolic () characters in locale files, the following change removes the verbose warning that is raised if you use non-symbolic characters in the locale file. Signed-off-by: Carlos O'Donell --- ChangeLog | 6 ++++++ locale/programs/linereader.c | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b31d3ec4b2..3c8c45e794 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-10-13 Carlos O'Donell + [BZ #22295] + * locale/programs/linereader.c (get_string): Don't warn on + non-symbolic character. + +2017-10-13 Carlos O'Donell + [BZ #22294] * locale/programs/ld-monetary.c (monetary_finish): Allow "" int_curr_symbol. diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c index 52b340963a..02fb4767d3 100644 --- a/locale/programs/linereader.c +++ b/locale/programs/linereader.c @@ -634,7 +634,6 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, size_t buf2act = 0; size_t buf2max = 56 * sizeof (uint32_t); int ch; - int warned = 0; /* We have to provide the wide character result as well. */ if (return_widestr) @@ -664,13 +663,6 @@ get_string (struct linereader *lr, const struct charmap_t *charmap, break; } - if (verbose && !warned) - { - lr_error (lr, _("\ -non-symbolic character value should not be used")); - warned = 1; - } - ADDC (ch); if (return_widestr) ADDWC ((uint32_t) ch); -- 2.11.4.GIT