Use euro symbol include file not displaying correctly

Get help with using AutoHotkey and its commands and hotkeys
ambrosedheffernan
Posts: 3
Joined: 20 Sep 2019, 16:43

Use euro symbol include file not displaying correctly

20 Sep 2020, 18:36

I have a problem using euro symbols within an included script.

If I set an variable inside my included file, it does not display correctly, but setting in my script (which gets called) works correctly.

When I check encoding in the script file and the included file, both are UTF8.

script.ahk

Code: Select all

#include base.ahk

euro = €

function_with_euro(euro) ;works

function_without_euro() ;does not work.
Base.ahk

Code: Select all

#NoEnv 
; #Warn 
SendMode Input  
SetWorkingDir %A_ScriptDir%  
FileEncoding , UTF-8

function_with_euro(euro) {
	msgbox, %euro
}

function_without_euro() {
	euro = €
	msgbox, %euro
}
gregster
Posts: 5200
Joined: 30 Sep 2013, 06:48

Re: Use euro symbol include file not displaying correctly

20 Sep 2020, 18:40

ambrosedheffernan wrote:
20 Sep 2020, 18:36
When I check encoding in the script file and the included file, both are UTF8.
UTF-8 with BOM ?
That's what you need.

I don't think that this code runs at all.
This line should error out: msgbox, %euro
either msgbox, % euro (with space) or msgbox, %euro%

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], helming, songdg, TAC109 and 38 guests