util_unistr.c bug in samba-2.0.6pre
monyo at home.monyo.com
monyo at home.monyo.com
Sun Dec 12 09:39:07 GMT 1999
Hi.
I am evaluating SAMBA_2_0 latest CVS tree in Japanese environment. If
setting "coding system = SJIS" and "client codepage = 932", it seems
to work well, except one bug.
My util_unistr.c is
-rw-r--r-- 1 root bin 14614 Dec 12 15:26 util_unistr.c
that has a litte but severe bug, so UNICODE translation does not work
well. Apply this patch.
And I am also evaluating "coding system = EUC", but that has lots of
problems :-( and now I am finding out them.
*** util_unistr.c.org Sun Dec 12 18:31:50 1999
--- util_unistr.c Sun Dec 12 18:33:00 1999
***************
*** 61,67 ****
*/
if (skip == 2)
! val = ((val << 8) | src[1]);
SSVAL(dst,ret,doscp_to_ucs2[val]);
ret += 2;
--- 61,67 ----
*/
if (skip == 2)
! val = ((val << 8) | (src[1] & 0xff));
SSVAL(dst,ret,doscp_to_ucs2[val]);
ret += 2;
***************
*** 279,285 ****
*/
if (skip == 2)
! val = ((val << 8) | src[1]);
SSVAL(dst,0,doscp_to_ucs2[val]);
if (skip)
--- 279,285 ----
*/
if (skip == 2)
! val = ((val << 8) | (src[1] & 0xff));
SSVAL(dst,0,doscp_to_ucs2[val]);
if (skip)
-----
Motonobu TAKAHASHI mailto:monyo at home.monyo.com
http://home.monyo.com/
More information about the samba-technical
mailing list