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>
diff --git a/src/version.c b/src/version.c
index b7812fa..159fe3b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 530,
+/**/
529,
/**/
528,
diff --git a/src/xxd/Make_mvc.mak b/src/xxd/Make_mvc.mak
index 0133d73..2361ab3 100644
--- a/src/xxd/Make_mvc.mak
+++ b/src/xxd/Make_mvc.mak
@@ -9,7 +9,7 @@
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