AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare Topic is solved

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 04:09

Code: Select all

RückG := "Hallo"
MsgBox %RückG%
Return
Ich habe seit Jahren mit Windows 7 32 Bit und AHK_H a32 gearbeitet. Jetzt bin ich auf Windows 10 64 Bit umgestiegen und lasse dort mein benötigtes Windows 7 32 Bit samt AHK_H a32 auf einer virtuellen VMWare-Maschine laufen. Auf dem Windows 10-Host läuft AHK_H nach wie vor problemlos. Nur auf meinem Windows 7 32 Bit-Guest habe ich plötzlich mit demselben AHK_H und den gleichen Skripts ein Umlaute-Problem. Z. B. Löst die Variable %RückG% die Fehlermeldung aus The following variable name contains an illegal character: "R?ckG". Was ist da los? Kann bitte jemand helfen?
Image
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 04:49

Reflexartig (Versuch macht klug) würde ich auf die "Speichere das Script in UTF-8/16 BOM Encoding ab" Thematik tippen. Ist aber lediglich ein Verdacht :shifty:
PS. Hast du vorab bereits mal bei @HotKeyIt im AHK_H-Forum angefragt?
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 04:58

@BoBo, danke! Ich fürchte die Umstellung auf UTF-8/16 BOM Encoding, nachdem ich schon so lange (aus Kompatibilitätsgründen!) mit ANSI gearbeitet habe. Damit werde ich noch etwas warten.
Bei HotKeyIt im AHK_H-Forum werde ich auf hier verlinken.

Ich sehe hier gerade, dass man in VMWare die Codepage verändern könnte. Aber die voreingestellte Codepage windows-1252 scheint schon richtig zu sein, vgl. hier, insbesondere auch für ANSI.
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 07:19

Benutzt du die ANSI Version von AHK_H?
Das muss definitiv mit Systemeinstellung zu tun haben, wenn du magst können wir mal über TeamViewer uns anschauen.

Edit:
Du kannst auch gerne AHK_L probieren, sollte das Problem auch kommen.
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 07:22

@HotKeyIt, ja, die ansi-Version AHK_H a32.
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 07:24

Ist der Virtual PC auf Deutsch eingestellt?

Edit:
Was bekommst du hier: MsgBox GetACP()
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 07:32

Ja, der Virtual PC ist Deutsch.
MsgBox % GetACP() ergibt auf dem Virtual PC die Zahl 1252
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

19 Feb 2022, 07:55

AHK_L v1.1.33.10 hat das gleiche Problem. Kein Unterschied. Gerade getestet.
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

20 Feb 2022, 03:16

MsgBox % GetACP() ergibt sowohl auf dem Windows 7-Guest als auch auf dem Windows 10-Host die Zahl 1252.
just me
Posts: 9528
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare  Topic is solved

20 Feb 2022, 04:02

Moin,

wenn ich richtig verstehe, speicherst Du Deine Skripte nicht im UTF-8 Format. Wenn Du AHK in der virtuellen Maschine neu installiert hast, hast Du vielleicht versehentlich die Option "Default to UTF-8" aktiviert?

-> Zeichensatz einer Skript-Datei
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

20 Feb 2022, 04:29

@just me, Deine Frage war die ganz entscheidende Frage! Ich habe AHK_L unter Beachtung Deiner Frage diesmal bewußt jetzt ohne die die Option "Default to UTF-8" installiert, was sofort dazu geführt hat, dass das Umlaut-Problem behoben war. Als ich dann wieder auf AHK_H umgestellt habe, war das Problem auch dort behoben. DANKE!

Sollte man diese Option nicht automatisch deaktivieren, wenn ANSI-AHK installiert wird? Im Anschluss daran frage ich mich, wo in der Registry sich die Option "Default to UTF-8" auswirkt, also wo sich das Problem gezielt beheben läßt. Ich frage mich auch, ob es noch andere undokumentierte AHK-Funktionen wie GetACP() gibt...

EDIT:
Ich denke, die richtige Registry-Einstellung lautet jetzt offenbar (etwas kryptisch) wie folgt:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Open\Command]
@="\"C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\" \"%1\" %*"
just me
Posts: 9528
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

20 Feb 2022, 06:56

Hi,

soweit ich gelesen habe, fügt der Installer in der Registry dem Aufruf für die AHK-Exe noch die Option /CP65001 hinzu.

GetACP() gibt es nur in AHK-H, weil @HotKeyIt einige API-Funktionen auch ohne DllCall() verfügbar macht. :arrow: WinAPI
Johnny R
Posts: 348
Joined: 03 Oct 2013, 02:07

Re: AHK_H-Problem mit Umlauten unter Windows 7 auf VMWare

16 Sep 2022, 07:28

@just me, jetzt hatte ich das Problem bei einem anderen PC wieder. Wenn der von dir benannte Schalter /CP65001 entfernt wird, ist alles gut. Da liegt der Hase im Pfeffer. Viele Grüsse und noch einmal vielen Dank!

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 9 guests