Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse utf8 BOM encoded files #5

Closed
Drugoy opened this issue Sep 1, 2022 · 5 comments
Closed

Fails to parse utf8 BOM encoded files #5

Drugoy opened this issue Sep 1, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@Drugoy
Copy link

Drugoy commented Sep 1, 2022

Currently they cause "Syntax Error in line X: Command '/*' not found."

@phil294
Copy link
Owner

phil294 commented Sep 2, 2022

could you please share some code? as far as I can tell, it works fine.

@phil294
Copy link
Owner

phil294 commented Sep 2, 2022

found the problem, it's because your linked file is saved as UTF-8 with BOM. Any command fails, not just /*

I don't really remember the point of BOMs, but https://unix.stackexchange.com/a/381237/103120 says

A BOM doesn't make sense in UTF-8. Those are generally added by mistake by bogus software on Microsoft OSes.

so for now I guess just do dos2unix DrugWinManager.ahk once.

ahkx11 should eventually also support utf-bom, and also \r\n delimited text files (I assume that doesn't work either).

Regarding the script itself, I guess it was just for demo purposes? Because in case you don't know, you can in no way just execute windows ahk scripts with this very tool

@phil294 phil294 changed the title Support block comments (/* multi-line comment */) Fails to parse utf8 BOM encoded files Sep 2, 2022
@phil294 phil294 added the bug Something isn't working label Sep 2, 2022
@Drugoy
Copy link
Author

Drugoy commented Sep 3, 2022

Thanks for evaluating the real issue here and editing this ticket.
As for the script itself - I've recently just learned about ahk_x11 and I don't yet know what it's capable of at all and what I actually need from it now that I live on linux.
I guess, most of all I miss proper hotstringing (on the level that AHK delivered it on Windows).

@phil294
Copy link
Owner

phil294 commented Oct 21, 2023

non-utf8 or bom-files will now (upcoming release) just be rejected with an explicit message at startup, that's good enough for me

@phil294 phil294 closed this as completed Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants