Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cscript.exe doesn't read unicode script (UTF-8)

Tags:

unicode

utf-8

wsh

simply save the following in notepad using UTF-8

msgbox "你好"

double click or run it from command line

D:\>cscript.exe /u test-unicode.vbs
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

D:\test-unicode.vbs(1, 1) Microsoft VBScript compilation error: Invalid characte
r

is there any way to run the unicode script in Windows Script Host?

like image 703
justyy Avatar asked Mar 11 '26 00:03

justyy


1 Answers

cscript.exe can run scripts saved using [Unicode] (seems UTF-16).

like image 134
justyy Avatar answered Mar 12 '26 18:03

justyy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!