[openstreetmap/openstreetmap-website] Increase may key and value max length (#2025)
Aaron Muir Hamilton
notifications at github.com
Tue Sep 20 19:57:05 UTC 2022
Is this limitation documented for real anywhere? When you say "char" what exactly do you mean? Do you mean 255 UTF-8 bytes? libosmium says the strings can be up to 256 _four byte codepoints_, which is 1024 bytes of whatever you want. MySQL schema interpretation of varchar is different between versions, so can either mean 255 codepoints or 255 bytes of UTF-8.
It seems that people are further confused about this in the ecosystem, because https://github.com/MarcusWolschon/osmeditor4android/issues/1401 references this issue, but the "fix" they have only truncates values based on UTF-16 values, which will allow values larger than 255 UTF-8 bytes, but will fail on values 255 codepoints or fewer, when those codepoints are represented with a surrogate pair.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2025#issuecomment-1252839128
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/2025/1252839128 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220920/3beb6006/attachment.htm>
More information about the rails-dev
mailing list