-
Notifications
You must be signed in to change notification settings - Fork 1
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
ExplorerCreateFile: set encoding of new files content #60
Comments
Yes, should work with FileEncoding :). |
Hey @Cyberklabauter its in! :) |
Awesome. Thx so much! Another of my scripts I can drop.
|
Ah ok 👍 I was just grabbing the exact terms from the FileEncoding docs, added them to the ui/a2ahk.py and filled the menu like that. I wouldn't have thought that these are needed. But here we have a request :) I wonder how I'd do the "any" codepage thing. And just to clarify: The RAW ones are the BOM ones? I think I'll add a link to the Autohotkey docs right in the menu... |
OK. For now I put an integer to set the encoding from that short list .. The thing with the opening ... sorry for being so picky with this but this would be out of the scope of this issue. Moved it to a new one #66 :) |
You are fast. Wow. I think it adresses a smaller group of users. Anyways, it is quite powerfull option, to create files very quickly which matching your needs. Thank you!
Sorry: This was misleading. Somehow I wrote it upside down. Of course RAW stands for WITHOUT BOM (Byte Order Mark).
|
Ah Ok I see. looking at the docs it looks like their order is rather:
🤔 But the "standard" encoding in these terms would be Now .. I think I'll remove this |
Yes, As I know the UTF-8 Specifications recommend UTF.8 without BOM. But this topic is quite confusing and I am not an expert on it. AHK usually adds a BOM; From the FAQ:
I interpret this, that if you don't use the UTF-8-RAW option (which most scripts won't do) with FileRead or FileOpen BOM is automatically added to the string and represented in each files you will save the string to. |
I just had a look at my notes why I use BOM with my AHK scripts: Lexikos recommended it, so I decided to go with it:
|
Ok. We should have some defaults anyway. I'd suggest to have sth like:
but that's another topic again. But might be easy ;) |
Can't say something to python. The rest looks good or how I would chose it. May,
to keep same coding style (just because it is a template 😉) |
Ok. I made some UX improvements and made the 2 things "create from menu list" and "create from clipboard" more or less work basically the same, made them all have all their features with porting some things to the main lib. like:
And also:
|
having defaults is a new issue now :) #67 |
@Cyberkabauter contributed an idea in a2#250:
Yes! Good idea! I wonder if that acually works if there is no content given yet but it all comes down to the capabilities we get from Autohotkeys
FileEncoding
The text was updated successfully, but these errors were encountered: