Live data from Hacker News

Charset="WTF-8"

wtf-8.xn--stpie-k0a81a.com

21–30 of 463 posts

Re: Charset="WTF-8"

#21
post #3

Earlier 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…

Apostrophe is common in surnames in parts of the world.

Re: Charset="WTF-8"

#22
post #3
post #2

A 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?

It is if you first provide a complete specification of a “name”. Then you can validate if a name is compliant with your specification.

Re: Charset="WTF-8"

#23

Earlier quoted context omitted.

Yes, it is essential when you want to avoid doing business with customers who have invalid names.

You joke, but when a customer wants to give your company their money, it is our duty as developers to make sure their names are valid . That is so business critical!

In legitimate retail, take the money, has always been the motto.

That said, recently I learned about monetary policy in North Korea and sanctions on the import of luxury goods.

Why Nations Fail (2012) by Daron Acemoglu and James Robinson

https://en.wikipedia.org/wiki/United_Nations_Security_Counci...

Re: Charset="WTF-8"

#24
post #3

Earlier 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…

You forgot apostrophe as is common in Irish names like O’Brien.

Re: Charset="WTF-8"

#25
post #3

Earlier 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…

Comma or apostrophe, like in d'Alembert ?

(And I have 3 in my keyboard, I'm not sure everyone is using the same one.)

Re: Charset="WTF-8"

#26
post #3

Earlier 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…

> 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. Issues like forbidden characters, or because it's too long since Japanese names (family name + first name) are typically only 4 characters long.

Also, when you get a visa to Japan, you have to bend and disform the pronunciation of your name to make it fit into the (limited) Japanese syllabary.

Funnily, they even had to register a whole new unicode range at some point, because old administrative documents sometimes contains characters that have been deprecated more than a century ago.

https://ccjktype.fonts.adobe.com/2016/11/hentaigana.html

Re: Charset="WTF-8"

#27
post #20
post #6

Earlier quoted context omitted.

Yes, it's easy bool ValidateName(string name) => true; (With the caveat that a name might not be representable in Unicode, in which case I dunno. Use an image format?)

name.Length > 0 is probably pretty safe.

What if my name is

Re: Charset="WTF-8"

#28
I've got a good feel now for which forms will accept my name and which won't, though mostly I default to an ASCII version for safety. Similarly, I've found a way to mangle my address to fit a US house/state/city/zip format.

I don't feel unwelcome, I emphathize with the developers. I'd certainly hate to figure out address entry for all countries. At least the US format is consistent across websites and I can have a high degree of confidence that it'll work in the software, and my local postal service know what to do because they see it all the time.

Re: Charset="WTF-8"

#29
post #20
post #6

Earlier quoted context omitted.

Yes, it's easy bool ValidateName(string name) => true; (With the caveat that a name might not be representable in Unicode, in which case I dunno. Use an image format?)

name.Length > 0 is probably pretty safe.

That only works if you’re concatenating the first and last name fields. Some people have no last name and thus would fail this validation if the system had fields for first and last name.

Re: Charset="WTF-8"

#30
post #20
post #6

Earlier quoted context omitted.

Yes, it's easy bool ValidateName(string name) => true; (With the caveat that a name might not be representable in Unicode, in which case I dunno. Use an image format?)

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-...

Post reply on HN