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

Fix utf-8-auto and missing cl-deftype #43

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

tgbugs
Copy link
Contributor

@tgbugs tgbugs commented Jan 29, 2023

Due to upcoming changes in Emacs 29.1 utf-8-auto now produces a byte
order mark at the start of strings and no longer matches utf-8-unix.
Emacs is also not equipped to deal with byte order marks appearing on
their own, and will parse them as a symbol with the name \uFEFF (eek).

The end result is that trying to decode utf-8-auto with utf-8-unix in
Emacs 29 will result in an insanity inducing bug where calling read on
a string with a byte order mark (that doesn't render!!!) appears to
produce ... absolutely nothing, which turns out to be the symbol
mentioned above.

emacs-mirror/emacs@cfd2b35

Given the absolute nightmare that byte order marks cause in Emacs, I strongly suggest switching everything over to utf-8-unix to avoid nasty cases like this in the future, and to save 3 bytes on every message!

Due to upcoming changes in Emacs 29.1 utf-8-auto now produces a byte
order mark at the start of strings and no longer matches utf-8-unix.
Emacs is also not equipped to deal with byte order marks appearing on
their own, and will parse them as a symbol with the name \uFEFF (eek).

The end result is that trying to decode utf-8-auto with utf-8-unix in
Emacs 29 will result in an insanity inducing bug where calling read on
a string with a byte order mark (that doesn't render!!!) appears to
produce ... absolutely nothing, which turns out to be the symbol
mentioned above.

emacs-mirror/emacs@cfd2b35
@nnicandro nnicandro merged commit ce1c1a5 into nnicandro:master Jan 31, 2023
@nnicandro
Copy link
Owner

Thank you!

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.

None yet

2 participants