commit a3042000fa6f2cf1eb3c30264bd86a7cb37b992f
Author: Michael Schroeder
Date: Wed Jan 21 11:44:29 2009 +0100
- repo_rpmdb: Fix conversion to UTF8
---
package/libsatsolver.changes | 5 +++++
tools/repo_rpmdb.c | 6 ++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/package/libsatsolver.changes b/package/libsatsolver.changes
index 040a47d..bc04d86 100644
--- a/package/libsatsolver.changes
+++ b/package/libsatsolver.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Jan 21 11:43:52 CET 2009 - mls@suse.de
+
+- repo_rpmdb: Fix conversion to UTF8
+
+-------------------------------------------------------------------
Thu Jan 8 10:37:53 CET 2009 - dmacvicar@suse.de
- handle patch conflicts different also in trivial_installable
diff --git a/tools/repo_rpmdb.c b/tools/repo_rpmdb.c
index c81c8a4..6c597c9 100644
--- a/tools/repo_rpmdb.c
+++ b/tools/repo_rpmdb.c
@@ -329,7 +329,7 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str)
{
/* new sequence */
if (c >= 0xfe)
- c = 0xfffd;
+ break;
else if (c >= 0xfc)
c = (c & 0x01) | 0xbffffffc; /* 5 bytes to follow */
else if (c >= 0xf8)
@@ -340,10 +340,8 @@ setutf8string(Repodata *repodata, Id handle, Id tag, const char *str)
c = (c & 0x0f) | 0xbff00000; /* 2 */
else if (c >= 0xc2)
c = (c & 0x1f) | 0xfc000000; /* 1 */
- else if (c >= 0xc0)
- c = 0xfdffffff; /* overlong */
else if (c >= 0x80)
- c = 0xfffd;
+ break;
}
state = (c & 0x80000000) ? c : 0;
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org