Skip to content

Conversation

@brian6932
Copy link
Contributor

@brian6932 brian6932 commented Nov 13, 2024

The GitHub frontend parses this file, and will apply ini syntax highlighting to the dni file.
https://github.com/brian6932/AltSnap/blob/patch-1/AltSnap.dni vs https://github.com/RamonUnch/AltSnap/blob/main/AltSnap.dni. When swapping back and forth, make sure to CTRL+SHIFT+R or CTRL+F5 at least once, or use separate browsers, to invalidate the GH frontend's cache. Realistically a name like AltSnap-default.ini would be better than AltSnap.dni, as it would work OOTB on most editors, and the GH frontend.
I also noticed that this file's no longer utf16le, and is now utf8, was this intended? If not it can be changed in this file here with working-tree-encoding.

@RamonUnch
Copy link
Owner

Thanks for the detail.
encoding is a mistake though, it should be utf16le with the BOM. I think github really hates anything other than utf-8.
I prefer the .dni extension because as funny as it sounds I want to keep those names 8.3 compatible. I still have troubles with FAT32 stuff sometime.

@brian6932
Copy link
Contributor Author

brian6932 commented Nov 13, 2024

encoding is a mistake though, it should be utf16le with the BOM.

I'll add that in.

I think github really hates anything other than utf-8.

git does, and GitHub by proxy.

@brian6932
Copy link
Contributor Author

brian6932 commented Nov 13, 2024

It seems like utf-16-le-bom isn't documented, but people do use it.
There are some issues with git actually converting the file (git add --renormalize AltSnap.dni).
error: failed to encode 'AltSnap.dni' from utf-16-le-bom to UTF-8
But maybe this at least works in the frontend? I'm not too sure, realistically I'd want to clone/checkout the branch, and see if it works as expected. Relevant Linux kernel mailing list logs regarding this https://lore.kernel.org/git/CA+JQ7M_Q_Qkh=+qziKg379e_xywQn2RBeAPNx29Dw6a5RXkY1A@mail.gmail.com/T/. Supporting legacy encodings' quite the pain 😅. It seems to clone right at the very least, but I don't believe it's being tracked as expected due to that error.

Contrary to my editor's recommendation, the actual formatting for this was wrong :D, and undocumented. This works as intended now. brian6932@3252220 🎉 the frontend understands it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants