You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enter é in the 'GET' input field and push the submit button
=> decoding error
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?
The text was updated successfully, but these errors were encountered:
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
é
in the 'GET' input field and push the submit button=> decoding error
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. Thee
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?
The text was updated successfully, but these errors were encountered: