bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] propername: return UTF-8 translation when possible


From: Jim Meyering
Subject: [PATCH] propername: return UTF-8 translation when possible
Date: Sun, 03 May 2009 06:47:50 +0200

Hi Bruno,

Without this, coreutils' "make check-AUTHORS" test fails.

>From fd29488d5cc8acd037b3659d58775b96471fa7eb Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 3 May 2009 06:46:23 +0200
Subject: [PATCH] propername: return UTF-8 translation when possible

* lib/propername.c (proper_name_utf8): Test not pointer equality,
but rather string equality.
---
 ChangeLog        |    4 ++++
 lib/propername.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3d72119..f5c5f8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-05-02  Jim Meyering  <address@hidden>

+       propername: return UTF-8 translation when possible
+       * lib/propername.c (proper_name_utf8): Test not pointer equality,
+       but rather string equality.
+
        build: ensure that a release build fails when a submodule is unclean
        * top/maint.mk (no-submodule-changes): New rule.
        (alpha beta major): Depend on it.
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)
--
1.6.3.rc4.190.g4648




reply via email to

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