Special Character Issue

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jadams
Posts: 73
Joined: 13 Mar 2020, 10:48

Special Character Issue

Post by jadams » 29 May 2020, 08:37

I'm having an issue working with the open quote symbol. If you look at my code below, it's setting the last character of the variable final to an open quote symbol. Then final last is that symbol. When the Msgbox pops though it comes out as ce or something like that and my if statement fails. Any ideas?

Code: Select all

			final = My name is “
			
			StringRight, final_last, % Trim(final), 1 ; Used to determin if the next transfer should have a cap at the start.
			
			Msgbox, %final_last%
			
			clipboard := %final_last%
			
			if (final_last = "“")
			{
				Msgbox, yes
			}
			else
			{
				Msgbox, no
			}
BNOLI
Posts: 548
Joined: 23 Mar 2020, 03:55

Re: Special Character Issue

Post by BNOLI » 29 May 2020, 08:48

https://www.autohotkey.com/boards/viewtopic.php?t=40048

Windows-1252 codepage
147 “
148 ”
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !
Rohwedder
Posts: 7768
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Special Character Issue

Post by Rohwedder » 29 May 2020, 08:52

Hallo,
try:

Code: Select all

MsgBox,% "A_AHKVersion: " A_AHKVersion "`nUnicode:`t" (A_IsUnicode?"yes":"no")
It should be:
A_AHKVersion: 1.1.32.00
Unicode: yes

and replace:

Code: Select all

clipboard := %final_last%
by:

Code: Select all

clipboard = %final_last%
or:

Code: Select all

clipboard := final_last
jadams
Posts: 73
Joined: 13 Mar 2020, 10:48

Re: Special Character Issue

Post by jadams » 29 May 2020, 09:21

Thanks guys
Post Reply

Return to “Ask for Help (v1)”