[openstreetmap/openstreetmap-website] The specific limits on keys and values are unclear. (Issue #3706)

Aaron Muir Hamilton notifications at github.com
Tue Sep 20 20:38:21 UTC 2022


@tomhughes [said:](https://github.com/openstreetmap/openstreetmap-website/issues/2025#issuecomment-1252881853)
> I mean probably it works fine given the setlocale I've just always steered clear of them myself.
> 
> If it works as intended then it's counting codepoints though (which is good) not UTF16 values.

`setlocale` doesn't save you in this case, because `std:mbsrtowcs` behaviour depends on both the locale and the size of `wchar_t`. I think it is standardized in C++11 but implementation-defined before then. Outside C++11, `wchar_t` may be a UTF-16 code unit, whereas in C++11 I believe it will be a Unicode Scalar Value in a 4-byte native endian integer.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3706#issuecomment-1252885795
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3706/1252885795 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220920/b560c6de/attachment.htm>


More information about the rails-dev mailing list