forked from aniani/vim
patch 8.1.0879: MS-Windows: temp name encoding can be wrong
Problem: MS-Windows: temp name encoding can be wrong. Solution: Convert from active code page to 'encoding'. (Ken Takata, closes #3520, closes #1698)
This commit is contained in:
parent
a02e3f65c5
commit
0036201a1a
18
src/fileio.c
18
src/fileio.c
@ -7470,6 +7470,24 @@ vim_tempname(
|
|||||||
for (p = retval; *p; ++p)
|
for (p = retval; *p; ++p)
|
||||||
if (*p == '\\')
|
if (*p == '\\')
|
||||||
*p = '/';
|
*p = '/';
|
||||||
|
|
||||||
|
#if defined(FEAT_MBYTE) && defined(WIN3264)
|
||||||
|
if (enc_utf8)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
char_u *pp = NULL;
|
||||||
|
|
||||||
|
// Convert from active codepage to UTF-8 since mch_call_shell()
|
||||||
|
// converts command-line to wide string from encoding.
|
||||||
|
acp_to_enc(retval, (int)STRLEN(retval), &pp, &len);
|
||||||
|
if (pp != NULL)
|
||||||
|
{
|
||||||
|
vim_free(retval);
|
||||||
|
return pp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
# else /* WIN3264 */
|
# else /* WIN3264 */
|
||||||
|
@ -783,6 +783,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
879,
|
||||||
/**/
|
/**/
|
||||||
878,
|
878,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user