Replacing with Accent Characters Fails

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mneimeyer
Posts: 2
Joined: 08 Jul 2019, 09:31

Replacing with Accent Characters Fails

Post by mneimeyer » 17 May 2022, 09:33

I have this line in my generic shortcuts script:

Code: Select all

::Pokemon::Pokémon
But what comes out the other side (at least on Win11) is:

Code: Select all

Pok�n
Any suggestions on what I should be checking for? This used to work but I don't remember if it started failing on Win10 or only on Win11.

Thanks!

P.S. I am running AHK 1.1.34.02 and installed the Unicode 64-Bit version.

gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Replacing with Accent Characters Fails

Post by gregster » 17 May 2022, 09:37

Save your script in UTF-8 with BOM encoding.
See https://www.autohotkey.com/docs/FAQ.htm#nonascii

mneimeyer
Posts: 2
Joined: 08 Jul 2019, 09:31

Re: Replacing with Accent Characters Fails

Post by mneimeyer » 19 May 2022, 11:23

That didn't help. I've quit the running instance, changed the file to UTF-8 with BOM, relaunched, reloaded it, checked that the encoding change took, etc and I'm still getting Pok�n when I try using it.

Anything else to check?

Thanks though!

User avatar
boiler
Posts: 16926
Joined: 21 Dec 2014, 02:44

Re: Replacing with Accent Characters Fails

Post by boiler » 19 May 2022, 11:38

Run this script to see if you are using the Unicode or ANSI version of AutoHotkey:

Code: Select all

MsgBox, % A_IsUnicode ? "Unicode" : "ANSI"

If you are using ANSI, then run the installer again and switch to Unicode. Or if you prefer, I could explain how you can manually copy and rename a file in your AHK installation directory to achieve the same thing.

Post Reply

Return to “Ask for Help (v1)”