Live data from Hacker News

Charset="WTF-8"

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

11–20 of 463 posts

Re: Charset="WTF-8"

#11
Pfft, "Dein Name ist ungültig" (your name is invalid). Let's get straight to the point, it's the user's fault for having a bad name, user needs to fix this.

Re: Charset="WTF-8"

#12
post #8
post #3

Earlier quoted context omitted.

Is name validation even possible?

You may not want Bobby Tables in your system.

If you're prohibiting valid letters to protect your database because you didn't parametrize your queries, you're solving the problem from the wrong end

Re: Charset="WTF-8"

#13
post #3

Earlier quoted context omitted.

Is name validation even possible?

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!

Re: Charset="WTF-8"

#14
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?

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 child (whom they call X) had to have his name officially changed to X Æ A-Xii in order to align with California laws regarding birth certificates."

(Of course I'm not saying you should do this. It is fun to wonder though.)

Re: Charset="WTF-8"

#15
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?

Presumably there aren't any people with control characters in their name, for example.

Re: Charset="WTF-8"

#16

I have an 'æ' in my middle name (formally secondary first name because history reasons). Usually I just don't use it, but it's always funny when a payment form instructs me to write my full name exactly as written on my credit card, and then goes on to tell me my name is invalid.

I live in Łódź.

Love receiving packages addressed to ??d? :)

Re: Charset="WTF-8"

#17
post #3

Earlier quoted context omitted.

Is name validation even possible?

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

What if your customer is the artist formerly known as Prince or even X Æ A-12 Musk?

Re: Charset="WTF-8"

#20
post #6
post #3

Earlier quoted context omitted.

Is name validation even possible?

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.

Post reply on HN