summaryrefslogtreecommitdiff
path: root/lib/unistr
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-01-10 23:11:54 +0100
committerBruno Haible <bruno@clisp.org>2010-01-10 23:11:54 +0100
commit4590e3da98b250317145c92090a8caf41c92c925 (patch)
tree6cb4f27ca4230d1ddfad29e10d3b98718b7fb918 /lib/unistr
parentb37182eb01e20e28b78bc65033b01a51c658e2fc (diff)
downloadgnulib-4590e3da98b250317145c92090a8caf41c92c925.tar.gz
unistr/u*-strcoll: Try harder to distinguish different strings.
Diffstat (limited to 'lib/unistr')
-rw-r--r--lib/unistr/u-strcoll.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/unistr/u-strcoll.h b/lib/unistr/u-strcoll.h
index e1dc713819..9ec5c60170 100644
--- a/lib/unistr/u-strcoll.h
+++ b/lib/unistr/u-strcoll.h
@@ -41,6 +41,12 @@ FUNC (const UNIT *s1, const UNIT *s2)
/* strcoll succeeded. */
free (sl1);
free (sl2);
+ /* The conversion to locale encoding can do transliteration or
+ map some characters to question marks. Therefore sl1 and sl2
+ may be equal when s1 and s2 were in fact different. Return a
+ nonzero result in this case. */
+ if (result == 0)
+ result = U_STRCMP (s1, s2);
}
else
{