0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 9.1.0530: xxd: MSVC warning about non-ASCII character

Problem:  xxd: MSVC warning about non-ASCII character
Solution: Specify source-charset:utf-8 in Makefile (Ken Takata)

xxd.c has non-ASCII-character comments. This causes the following
warning on MSVC:
```
warning C4819: The file contains a character that cannot be represented
in the current code page (932). Save the file in Unicode format to
prevent data loss.
```

Add the `/source-charset:utf-8` option to avoid this.

closes: #15119

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ken Takata
2024-07-04 19:35:48 +02:00
committed by Christian Brabandt
parent 749ba0f6d9
commit 470c0db2b3
2 changed files with 3 additions and 1 deletions

View File

@@ -704,6 +704,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 */
/**/
530,
/**/ /**/
529, 529,
/**/ /**/

View File

@@ -9,7 +9,7 @@ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
xxd: xxd.exe xxd: xxd.exe
xxd.exe: xxd.c xxd.exe: xxd.c
cl /nologo -DWIN32 xxd.c -link -subsystem:$(SUBSYSTEM) cl /nologo /source-charset:utf-8 -DWIN32 xxd.c -link -subsystem:$(SUBSYSTEM)
# This was for an older compiler # This was for an older compiler
# cl /nologo -DWIN32 xxd.c /link setargv.obj # cl /nologo -DWIN32 xxd.c /link setargv.obj