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

4 views
Skip to first unread message

Christian Brabandt

unread,
Jul 4, 2024, 1:45:12 PM7/4/24
to vim...@googlegroups.com
patch 9.1.0530: xxd: MSVC warning about non-ASCII character

Commit: https://github.com/vim/vim/commit/470c0db2b3a592a7fe47b17818d4d50ed79360b3
Author: Ken Takata <ken...@csc.jp>
Date: Thu Jul 4 19:35:48 2024 +0200

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 <ken...@csc.jp>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/version.c b/src/version.c
index b7812fa00..159fe3b81 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 530,
/**/
529,
/**/
diff --git a/src/xxd/Make_mvc.mak b/src/xxd/Make_mvc.mak
index 0133d7311..2361ab3d5 100644
--- a/src/xxd/Make_mvc.mak
+++ b/src/xxd/Make_mvc.mak
@@ -9,7 +9,7 @@ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
xxd: xxd.exe

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
# cl /nologo -DWIN32 xxd.c /link setargv.obj
Reply all
Reply to author
Forward
0 new messages