-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
[feature] Include charset in Content-Type header #2598
Comments
Thanks for the report. This isn't really a bug in GoToSocial since charset is not a required directive, and |
RFC 8259 obsoletes 7159 and states in section 8.1 Character encoding
In the context of ActivityPub, everyone's always used UTF-8. I'm not aware of a single implementation that's done otherwise, so assuming otherwise in your client or JSON parser is only going to cause problems. |
Ah thanks @daenney , I always struggle trying to find up-to-date RFCs |
Ah here, it's a known issue in dart: dart-lang/http#175 |
I'm gonna close this then since it's not really a GoToSocial issue; @Craftplacer there's code linked in dart-lang issue above that should let you update your parser to do utf-8 by default for json, which is compliant with the RFC linked by daenney |
Thanks for the heads-up. Then it's truly just jank Google stuff again 🥴 |
I was just reading the ActivityStreams spec, and realised that in the Serialization section it explicitly says:
So regardless of what JSON RFCs do-or-don't specify, in our context it is always is UTF-8. |
Well, not exactly. In this context we're talking specifically about the client API of GtS, not the client-to-server or server-to-server AP api. |
Ah, right, yes. Ah well. Anyway. UTF-8 🚀. |
Describe the bug with a clear and concise description of what the bug is.
GoToSocial's Content-Type header does not include the charset, causing clients like Kaiteki (mine hehe), to fallback to encodings other than UTF-8 causing garbled text (if not ASCII or whatever) on the client.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type#syntax
What's your GoToSocial Version?
0.13.1 git-ccecf5a
GoToSocial Arch
arm64 bin
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: