X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=lib%2Futil%2Fcharset%2Fcodepoints.c;h=19d084f3d4a59976474e550896727adea05e6191;hp=542eeae73a57789a982b1f759c3d0e20cf6b8ed5;hb=f07626d0297ed6bd21623409e1ea1ae1138d23a8;hpb=a561ae6294fa926bf3a15b9aaf3d18d25d5e971f;ds=sidebyside diff --git a/lib/util/charset/codepoints.c b/lib/util/charset/codepoints.c index 542eeae73a5..19d084f3d4a 100644 --- a/lib/util/charset/codepoints.c +++ b/lib/util/charset/codepoints.c @@ -331,7 +331,10 @@ _PUBLIC_ codepoint_t next_codepoint_handle_ext( size_t olen; char *outbuf; - if ((str[0] & 0x80) == 0) { + + if (((str[0] & 0x80) == 0) && (src_charset == CH_DOS || + src_charset == CH_UNIX || + src_charset == CH_UTF8)) { *bytes_consumed = 1; return (codepoint_t)str[0]; }