Prohibiting single-character keys at the API level

I saw some recently. Will run a check and report back.

My mistake, I confused maximum characters vs. maximum bytes (Thanks @SimonPoole for clarifying!)

I ran a check on a recent planet file, all key and value strings are indeed 255 characters or less.

Since a UTF-8 character can be 1 to 4 bytes, a legal OSM string can occupy a maximum of 1020 bytes (not including length counter or any terminating character).

/me expecting enterprising OSMers now to start encoding > 255 ASCII chars in tags :slight_smile:

Or, in the opposite direction… Do diacritical marks count towards the character limit? (β€œΓ©β€ could be single character, or two code points (base letter and the combining acute accent)