Patch 8.2.2962
Problem: MS-Windows command line arguments have wrong encoding.
Solution: Always use utf-8 in get_cmd_argsW(). (Ken Takata, closes #8347)
Files: src/os_win32.c
*** ../vim-8.2.2961/src/os_win32.c 2021-06-02 13:28:11.435120452 +0200
--- src/os_win32.c 2021-06-08 18:30:57.907654229 +0200
***************
*** 7558,7564 ****
/*
! * The command line arguments in UCS2
*/
static int nArgsW = 0;
static LPWSTR *ArglistW = NULL;
--- 7558,7564 ----
/*
! * The command line arguments in UTF-16
*/
static int nArgsW = 0;
static LPWSTR *ArglistW = NULL;
***************
*** 7601,7608 ****
{
int len;
! // Convert each Unicode argument to the current codepage.
! WideCharToMultiByte_alloc(GetACP(), 0,
ArglistW[i], (int)wcslen(ArglistW[i]) + 1,
(LPSTR *)&argv[i], &len, 0, 0);
if (argv[i] == NULL)
--- 7601,7608 ----
{
int len;
! // Convert each Unicode argument to UTF-8.
! WideCharToMultiByte_alloc(CP_UTF8, 0,
ArglistW[i], (int)wcslen(ArglistW[i]) + 1,
(LPSTR *)&argv[i], &len, 0, 0);
if (argv[i] == NULL)
***************
*** 7678,7684 ****
/*
* Fix the encoding of the command line arguments. Invoked when 'encoding'
! * has been changed while starting up. Use the UCS-2 command line arguments
* and convert them to 'encoding'.
*/
void
--- 7678,7684 ----
/*
* Fix the encoding of the command line arguments. Invoked when 'encoding'
! * has been changed while starting up. Use the UTF-16 command line arguments
* and convert them to 'encoding'.
*/
void
*** ../vim-8.2.2961/src/version.c 2021-06-07 22:04:48.406620074 +0200
--- src/version.c 2021-06-08 18:32:17.355483838 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2962,
/**/
--
SOLDIER: Where did you get the coconuts?
ARTHUR: Through ... We found them.
SOLDIER: Found them? In Mercea. The coconut's tropical!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202106081633.158GX9Jr876397%40masaka.moolenaar.net.