summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-07-06 08:59:50 +0000
committerAndrew Tridgell <tridge@samba.org>2001-07-06 08:59:50 +0000
commit4b7c8070857e84c151bcec6ccb015cb0b219be8b (patch)
treebac59f9976462d7997cb8c401ea3a0ae0998abf1
parent7a58c800ed8e86a26b2db44a417ebaadb0dd48b7 (diff)
downloadsamba-4b7c8070857e84c151bcec6ccb015cb0b219be8b.tar.gz
samba-4b7c8070857e84c151bcec6ccb015cb0b219be8b.tar.bz2
samba-4b7c8070857e84c151bcec6ccb015cb0b219be8b.zip
fixed a silly bug in the internal UTF8 implementation
(This used to be commit 95a9a1814f1a1ac07c316cc920c7493a86d5a09b)
-rw-r--r--source3/lib/iconv.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c
index 0c722e71dd..e0988dc46a 100644
--- a/source3/lib/iconv.c
+++ b/source3/lib/iconv.c
@@ -63,8 +63,22 @@ size_t smb_iconv(smb_iconv_t cd,
#ifdef HAVE_NATIVE_ICONV
if (cd->cd) {
size_t ret;
+#if 0
+ char *p = *outbuf;
+ char *q = *inbuf;
+ int inlen=*inbytesleft, outlen=*outbytesleft;
+#endif
+
ret = iconv(cd->cd, inbuf, inbytesleft, outbuf, outbytesleft);
+#if 0
+ if (strstr(p, "foo") || strstr(q, "foo")) {
+ DEBUG(0,("Foo 2!\n"));
+ dump_data(0, p, outlen - *outbytesleft);
+ dump_data(0, q, inlen - *inbytesleft);
+ }
+#endif
+
/* if there was an error then reset the internal state,
this ensures that we don't have a shift state remaining for
character sets like SJIS */
@@ -445,7 +459,6 @@ static size_t utf8_push(char **inbuf, size_t *inbytesleft,
}
- (*outbuf)[0] = (*inbuf)[0];
(*inbytesleft) -= 2;
(*outbytesleft) -= len;
(*inbuf) += 2;