openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

User preferences accepts only ASCII data

Open bryceco opened this issue 1 year ago • 2 comments

URL

https://api.openstreetmap.org/api/0.6/user/preferences/test

How to reproduce the issue?

I noticed this with emoji values, and verified it with a ć character.

curl -X PUT -d ‘👀’ https://api.openstreetmap.org/api/0.6/user/preferences/test Encoding::CompatibilityError: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)

Screenshot(s) or anything else?

No response

bryceco avatar Apr 07 '23 21:04 bryceco

I guess that for now https://en.wikipedia.org/wiki/Punycode or similar can be used as workaround (see https://github.com/bryceco/GoMap/commit/f79fc77ffd07e75c3ff2d761a13bbbe02e3a2cab where % encoding was used)

matkoniecz avatar Apr 08 '23 06:04 matkoniecz

See https://github.com/openstreetmap/openstreetmap-website/issues/4467#issuecomment-1885739614 on why this fails.

mmd-osm avatar Jan 10 '24 21:01 mmd-osm

Fixed in #4803.

tomhughes avatar May 16 '24 19:05 tomhughes