bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proper_name_utf8 misbehavior [Re: check-AUTHORS


From: Jim Meyering
Subject: proper_name_utf8 misbehavior [Re: check-AUTHORS
Date: Sat, 02 May 2009 11:50:31 +0200

Surprisingly, even with this patch, (and not built with --disable-nls),
that test would still fail:

diff --git a/src/Makefile.am b/src/Makefile.am
index 5c09906..372393a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -403,8 +403,8 @@ check-AUTHORS: $(all_programs)
          fi;                                           \
          LC_ALL="$$locale" ./$$exe --version           \
            | perl -0 -pi -e 's/,\n/, /gm'              \
-           | sed -n -e '/Written by /{ s//'"$$i"': /;' \
-                 -e 's/,* and /, /; s/\.$$//; p; }';   \
+           | sed -n -e '/.crit par /{ s//'"$$i"': /;'  \
+                 -e 's/,* et /, /; s/\.$$//; p; }';    \
        done > $(au_actual) &&                          \
        sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
        diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)

When I made this additional change, proper_name_utf8 then did
what I expected:

diff --git a/lib/propername.c b/lib/propername.c
index b3c91ae..8cf19dc 100644
--- a/lib/propername.c
+++ b/lib/propername.c
@@ -1,5 +1,5 @@
 /* Localization of proper names.
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2006.

    This program is free software: you can redistribute it and/or modify
@@ -242,7 +242,7 @@ proper_name_utf8 (const char *name_ascii, const char 
*name_utf8)
          name_converted_translit != NULL ? name_converted_translit :
          name_ascii);

-  if (translation != name_ascii)
+  if (strcmp (translation, name_ascii) != 0)
     {
       /* See whether the translation contains the original name.  */
       if (mbsstr_trimmed_wordbounded (translation, name_ascii)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]