Earlier quoted context omitted.
name.Length > 0 is probably pretty safe.
See point 40 and 32-36 on Falsehoods programmers believe about names[1] [1] https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...
Charset="WTF-8"
51–60 of 463 posts
Re: Charset="WTF-8"
#52A coworker once implemented a name validation regex that would reject his own name. It still mystifies me how much convincing it took to get him to make it less strict.
Is name validation even possible?
>echo "'Lódź'" | uconv -f "UTF-8" -t "UTF-8" -x "Latin-ASCII"
>'Lodz'
Re: Charset="WTF-8"
#53Earlier quoted context omitted.
Is name validation even possible?
If you just use the {Alphabetic} Unicode character class (100K code points), together with a space, hyphen, and maybe comma, that might get you close. It includes diacritics. I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? I wondered about numbers, but the most famous example of that has been overturned: "Originally named X Æ A-12, the chi…
[1] https://en.m.wikipedia.org/wiki/N%25C7%2583xau_%C7%82Toma
Re: Charset="WTF-8"
#54Earlier quoted context omitted.
If you just use the {Alphabetic} Unicode character class (100K code points), together with a space, hyphen, and maybe comma, that might get you close. It includes diacritics. I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? I wondered about numbers, but the most famous example of that has been overturned: "Originally named X Æ A-12, the chi…
What if one's name is not in alphabetic script? Let's say, "鈴木涼太".
Re: Charset="WTF-8"
#55Earlier quoted context omitted.
If you just use the {Alphabetic} Unicode character class (100K code points), together with a space, hyphen, and maybe comma, that might get you close. It includes diacritics. I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? I wondered about numbers, but the most famous example of that has been overturned: "Originally named X Æ A-12, the chi…
> I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? Latin characters are NOT allowed in official names for Japanese citizens. It must be written in Japanese characters only. For foreigners living in Japan it's quite frequent to end up in a situation where their official name in Latin does not pass the validation rules of many forms online. I…
To be clear, I wasn't thinking about within a specific country though.
More like, what is the set of all characters that are allowed in legal names across the world?
You know, to eliminate things like emoji, mathematical symbols, and so forth.
Re: Charset="WTF-8"
#56Earlier quoted context omitted.
Is name validation even possible?
Presumably there aren't any people with control characters in their name, for example.
This name, "คุณสมชาย" (Khun Somchai, a common Thai name), appears normal but has a Zero Width Space (U+200B) between "คุณ" (Khun, a title like Mr./Ms.) and "สมชาย" (Somchai, a given name).
In scripts like Thai, Chinese, and Arabic, where words are written without spaces, invisible characters can be inserted to signal word boundaries or provide a hint to text processing systems.
Re: Charset="WTF-8"
#57A system not supporting non-latin characters in personal names is pitiful, but a system telling the user that they have an invalid name is outright insulting.
Re: Charset="WTF-8"
#58Earlier quoted context omitted.
Is name validation even possible?
If you just use the {Alphabetic} Unicode character class (100K code points), together with a space, hyphen, and maybe comma, that might get you close. It includes diacritics. I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? I wondered about numbers, but the most famous example of that has been overturned: "Originally named X Æ A-12, the chi…
Re: Charset="WTF-8"
#59Earlier quoted context omitted.
Is name validation even possible?
Presumably there aren't any people with control characters in their name, for example.
Re: Charset="WTF-8"
#60Earlier quoted context omitted.
Presumably there aren't any people with control characters in their name, for example.
คุณ สมชาย This name, "คุณสมชาย" (Khun Somchai, a common Thai name), appears normal but has a Zero Width Space (U+200B) between "คุณ" (Khun, a title like Mr./Ms.) and "สมชาย" (Somchai, a given name). In scripts like Thai, Chinese, and Arabic, where words are written without spaces, invisible characters can be inserted to signal word boundaries or provide a hint to text processing systems.