From: Bruno Haible Date: Tue, 15 Jan 2002 13:04:03 +0000 (+0000) Subject: Don't consider a message as being ASCII if its msgid or msgid_plural is X-Git-Tag: v0.11~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75cc8b89ab624a205f4934e293436098a7c568fa;p=thirdparty%2Fgettext.git Don't consider a message as being ASCII if its msgid or msgid_plural is not ASCII. --- diff --git a/src/ChangeLog b/src/ChangeLog index dcd5b8334..544c79cf0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-01-13 Bruno Haible + + * msgl-ascii.c (is_ascii_message): Don't consider a message as being + ASCII if its msgid or msgid_plural is not ASCII. + 2002-01-12 Bruno Haible * gettext.c (main): Update year in --version output. diff --git a/src/msgl-ascii.c b/src/msgl-ascii.c index 0fb655905..b43aca7e0 100644 --- a/src/msgl-ascii.c +++ b/src/msgl-ascii.c @@ -1,5 +1,5 @@ /* Message list test for ASCII character set. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001-2002 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -69,6 +69,13 @@ is_ascii_message (mp) if (!is_ascii_string_list (mp->comment_dot)) return false; + /* msgid and msgid_plural are normally ASCII, so why checking? + Because in complete UTF-8 environments they can be UTF-8, not ASCII. */ + if (!is_ascii_string (mp->msgid)) + return false; + if (mp->msgid_plural != NULL && !is_ascii_string (mp->msgid_plural)) + return false; + return true; }