From: Michael Schroeder Date: Fri, 3 May 2013 12:15:37 +0000 (+0200) Subject: fix iso-8859-1 to utf8 transcoding bug X-Git-Tag: BASE-SuSE-Code-13_1-Branch~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c79caff33d904d60e639a0cd4394ccb1379b644;p=thirdparty%2Flibsolv.git fix iso-8859-1 to utf8 transcoding bug --- diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index dea9305b..5ed1c4e4 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -439,7 +439,7 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str) if (c >= 0xc0) { *bp++ = 0xc3; - c ^= 0x80; + c ^= 0xc0 ^ 0x80; } else if (c >= 0x80) *bp++ = 0xc2; diff --git a/ext/repo_rpmdb_pubkey.c b/ext/repo_rpmdb_pubkey.c index 8b6b453a..2ca79c77 100644 --- a/ext/repo_rpmdb_pubkey.c +++ b/ext/repo_rpmdb_pubkey.c @@ -102,7 +102,7 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str) if (c >= 0xc0) { *bp++ = 0xc3; - c ^= 0x80; + c ^= 0xc0 ^ 0x80; } else if (c >= 0x80) *bp++ = 0xc2;