ExecScript and Unicode

Get help with using AutoHotkey and its commands and hotkeys
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

ExecScript and Unicode

26 Jan 2015, 23:39

[Lexikos' note: Topic split from announcement thread.]

ExecScript throws an error when given a unicode character (such as ツ). This is a shame, since WScript.Shell's Exec is so very nice. Any way you can think of for me to work around this? (*imagines a flag for interpreting stdin as a script encoded in base64 and chuckles*)
lexikos
Posts: 6041
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: 1.1.17-19 - COM stuff, Format, StdIn/StdOut, bug-fixes,

27 Jan 2015, 00:31

Why this thread? [Edit: Topic was split.]

I don't think WScript supports Unicode properly. The only workaround I'm aware of is to stick to ASCII when writing the script (e.g. Chr(12484) is written in ASCII, but produces a Unicode character when executed).
GeekDude
Posts: 836
Joined: 02 Oct 2013, 22:13

Re: 1.1.17-19 - COM stuff, Format, StdIn/StdOut, bug-fixes,

27 Jan 2015, 07:43

This thread because this is where you announced ExecScript(). This isn't really a bug with AutoHotkey, so I didn't figure it should go in the bugs section. Nor is it a suggestion I have to improve the documentation, since I don't have any real idea what needs to be done
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: 1.1.17-19 - COM stuff, Format, StdIn/StdOut, bug-fixes,

27 Jan 2015, 10:03

@GeekDude, you can try my version of ExecScript. It still uses WshShell but you have the option to choose between running from stdin* or through a named pipe. The latter for unicode support given that you set the cp option to UTF-8/UTF-16. Sorry for hijacking the thread.
lexikos
Posts: 6041
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: ExecScript and Unicode

27 Jan 2015, 16:41

How to: Run Dynamic Script... Through a Pipe! explains why two pipes are needed.

It seems to me that you were asking for help with a script, so I have split the topic accordingly.

It can hardly be said that I "announced" ExecScript. I merely mentioned it as an example. This sort of thing is why I used to lock Announcement threads.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot] and 48 guests