-
Notifications
You must be signed in to change notification settings - Fork 246
Enforce the use of utf-8 as default charset for api mappings #1384
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
base: master
Are you sure you want to change the base?
Conversation
|
@amvanbaren - At your earliest convenience, could you please take a look at this MR? |
|
fyi: this is just one solution to the problem, I am happy to discuss other approaches but we should certainly ensure utf-8 encoding throughout the server imho. |
|
another option would be to add that to the Other option would be to explicitly set the content encoding to UTF-8 for all responses, but that is tedious and you might miss some occurrences. The downside of updating the configuration is that you must ensure that it is configured like that for your instance instead of hardcoding it in the application itself. |
Throughout or only |
|
so the change is currently for Some claim that this is the default, but I failed to find official documentation about it. Maybe just the |
|
This works for local storage, but not for cloud storage. |
|
I could not test yet on a cloud storage, so I feared that it will not work. Digging more into this topic, you can actually set properties for files stored in a blob: https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties?tabs=microsoft-entra-id That should also include content type and encoding, so we should change the existing storage provider to set the encoding to utf-8 by default. The question is how we modify existing files, there are currently 1.3M entries, of which there are several 100k text / json files which should be changed afaict |
This fixes #1346 .
A
CharacterEncodingFilteris added to enforce the use of UTF-8 encoding for any api request.