mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.0062
This commit is contained in:
13
src/mbyte.c
13
src/mbyte.c
@@ -990,6 +990,10 @@ dbcs_char2bytes(c, buf)
|
||||
{
|
||||
buf[0] = (unsigned)c >> 8;
|
||||
buf[1] = c;
|
||||
/* Never use a NUL byte, it causes lots of trouble. It's an invalid
|
||||
* character anyway. */
|
||||
if (buf[1] == NUL)
|
||||
buf[1] = '\n';
|
||||
return 2;
|
||||
}
|
||||
buf[0] = c;
|
||||
@@ -3087,7 +3091,14 @@ iconv_string(vcp, str, slen, unconvlenp)
|
||||
*to++ = '?';
|
||||
if ((*mb_ptr2cells)((char_u *)from) > 1)
|
||||
*to++ = '?';
|
||||
l = (*mb_ptr2len_check)((char_u *)from);
|
||||
if (enc_utf8)
|
||||
l = utfc_ptr2len_check_len((char_u *)from, fromlen);
|
||||
else
|
||||
{
|
||||
l = (*mb_ptr2len_check)((char_u *)from);
|
||||
if (l > fromlen)
|
||||
l = fromlen;
|
||||
}
|
||||
from += l;
|
||||
fromlen -= l;
|
||||
}
|
||||
|
Reference in New Issue
Block a user