mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.2-049
This commit is contained in:
@@ -6101,7 +6101,7 @@ string_convert_ext(vcp, ptr, lenp, unconvlenp)
|
||||
|
||||
/* 1. codepage/UTF-8 -> ucs-2. */
|
||||
if (vcp->vc_cpfrom == 0)
|
||||
tmp_len = utf8_to_ucs2(ptr, len, NULL, NULL);
|
||||
tmp_len = utf8_to_utf16(ptr, len, NULL, NULL);
|
||||
else
|
||||
tmp_len = MultiByteToWideChar(vcp->vc_cpfrom, 0,
|
||||
ptr, len, 0, 0);
|
||||
@@ -6109,13 +6109,13 @@ string_convert_ext(vcp, ptr, lenp, unconvlenp)
|
||||
if (tmp == NULL)
|
||||
break;
|
||||
if (vcp->vc_cpfrom == 0)
|
||||
utf8_to_ucs2(ptr, len, tmp, unconvlenp);
|
||||
utf8_to_utf16(ptr, len, tmp, unconvlenp);
|
||||
else
|
||||
MultiByteToWideChar(vcp->vc_cpfrom, 0, ptr, len, tmp, tmp_len);
|
||||
|
||||
/* 2. ucs-2 -> codepage/UTF-8. */
|
||||
if (vcp->vc_cpto == 0)
|
||||
retlen = ucs2_to_utf8(tmp, tmp_len, NULL);
|
||||
retlen = utf16_to_utf8(tmp, tmp_len, NULL);
|
||||
else
|
||||
retlen = WideCharToMultiByte(vcp->vc_cpto, 0,
|
||||
tmp, tmp_len, 0, 0, 0, 0);
|
||||
@@ -6123,7 +6123,7 @@ string_convert_ext(vcp, ptr, lenp, unconvlenp)
|
||||
if (retval != NULL)
|
||||
{
|
||||
if (vcp->vc_cpto == 0)
|
||||
ucs2_to_utf8(tmp, tmp_len, retval);
|
||||
utf16_to_utf8(tmp, tmp_len, retval);
|
||||
else
|
||||
WideCharToMultiByte(vcp->vc_cpto, 0,
|
||||
tmp, tmp_len, retval, retlen, 0, 0);
|
||||
|
Reference in New Issue
Block a user