From patchwork Fri Oct 13 19:34:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 825705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-85807-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="lQZxgVnh"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yDHwg2psXz9sxR for ; Sat, 14 Oct 2017 06:34:43 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:cc:message-id:date :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=F6iwwxHYGcKRxMYRyZ2LXJ0KBql29tyodQvevFLIPs7dwyJv+SG2K Fl8T6bP2iqlJXEl9jhdRq+mCtHDhLSV5SR8xKWLiqL7iHXedolBArBBhWj03Wcz+ nWoLjAHWxKgwq7ynpBwcjC/Lk6kqMquhCs+tLyyAHi22EbBSu9QAn4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:cc:message-id:date :mime-version:content-type:content-transfer-encoding; s=default; bh=q5OkOtuk/wK4LzHp+tpozH81leY=; b=lQZxgVnhOowU7ydjONojTG+iJZJA XOUEmo9eZjbG5TtSFUO8QlNd6V3SUigBLIG3lgBKSIkGqsHfOILTnOfeh+vCGcE9 N9J+fxea6Moq3Y+dfeKlzWDYtq1elNhbXJ/yfm8ZEZoiP5JqsCnuU/YCAqB4ZTQp aa4kFbJZsUWCdww= Received: (qmail 93442 invoked by alias); 13 Oct 2017 19:34:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 93414 invoked by uid 89); 13 Oct 2017 19:34:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=justify, humans X-HELO: mail-qt0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:organization:cc:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=l7ouJdgCY2z4GzmvZUYp2l3rvDTOLlk34bAVOimPDbo=; b=Nkpm/eWCP4SANdKv1dAP6RIYZT6LvP+NKzIx8rvUlgvw+OaxAGKF+FE5b0jO54l2Ax ojTzJpF9dLidPqsvzzJLzmqbtkKM+bfoBfmZYp56rhlC+G+3ezoeb1gKta7nrQls4VAv OR4PL44tdEe7sIxCpLVRx8WHag1gQWyeHEJrxO79TpzK6EmOI+WmAvLYPOmfkHjmlieh 76kYPpzGsh3DnmPfQydSqYF2V/hOO4EGAF5JihmaQmOJxZCwYVWaO9CsmgCO/UkQ09Pg yOUAWoFNIBQ8utEE4sbtra2fQtga57mFZftzmUpowZTqusz7MxsdL8NYVmXTKuT0yen2 0FvQ== X-Gm-Message-State: AMCzsaVweyNbJWZHYmvlgW7Y7jxcEtDvSxWiPfxl2KYXNefO0H7wcr8n yTu1CbTl2NaML1Im+BypyY51shSWQp8= X-Google-Smtp-Source: AOwi7QCIAp3ceXg2IYrfwZX1fGcRMxjX89Z9MgQ5Cg5d/4d+XeNqmhnWyqUEGQSLVgUpmX+zINaUiw== X-Received: by 10.237.59.198 with SMTP id s6mr3857520qte.281.1507923272968; Fri, 13 Oct 2017 12:34:32 -0700 (PDT) To: GNU C Library , Mike Fabian From: Carlos O'Donell Subject: [PATCH] locale: Avoid warning in --verbose mode for non-symbolic character. Cc: Zack Weinberg Message-ID: <818b80a3-a679-896a-f830-9ddf96e216fa@redhat.com> Date: Fri, 13 Oct 2017 12:34:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Mike, I'm working through a new C.UTF-8 locale and I need this fix to avoid warnings in --verbose mode. ~~~ commit msg: locale: Avoid warning in --verbose mode for non-symbolic character. 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 ~~~ Tested by building all locales and showing no warnings. Tested with my C.UTF-8 which issued warnings before and now it doesn't both when using --verbose. OK to checkin? 2017-10-13 Carlos O'Donell * locale/programs/linereader.c (get_string): Don't warn on non-symbolic character. diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c index 52b3409..02fb476 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);