Skip to content

Zinc adaptor in Pharo always defaults to UTF8 decoding of requests even if other encoding is set #1455

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

Open
jbrichau opened this issue Mar 13, 2025 · 0 comments

Comments

@jbrichau
Copy link
Member

jbrichau commented Mar 13, 2025

This is because the Zinc adaptor will always rely on Zinc for decoding of the bytes in the request. It defaults to UTF8 (in ZnPercentEncoder) and does not use the codec setting of the adaptor. In the scenario above, the page is served as latin1 and the browser will percent-encode the form values using latin1 codec in the request. The e is therefore encoded as %E9. On the server, Zinc tries to do: ZnPercentEncoder new decode: '%E9' which errors because it tries to use the UTF8 character decoder. (UTF8-based percent-encoding of é is %C3%A9)

I guess everyone is now using UTF8 anyways, so question is: do we need to fix this issue or do we need to remove the ability to work with anything else than UTF8?

@jbrichau jbrichau changed the title Zinc adaptor in Pharo always defaults to UTF8 decoding even if other decoder is set Zinc adaptor in Pharo always defaults to UTF8 decoding of requests even if other encoding is set Mar 13, 2025
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

No branches or pull requests

1 participant