Live data from Hacker News

Charset="WTF-8"

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

101–110 of 463 posts

Re: Charset="WTF-8"

#101

Earlier quoted context omitted.

Zalgo is largely the result of abusing combining modifiers. Declare that any string with more than n combining modifiers in a row is invalid. n=1 is probably a reasonable falsehood to believe about names until someone points out that language X regularly has multiple combining modifiers in a row, at which point you can bump up N to somewhere around the maximum number of combining modifiers language X is likely to hav…

N=2 is common in Việt Nam. (vowel sound + tonal pitch)

Yet Vietnamese can be written in Unicode without any combining characters whatsoever - in NFC normalization each character is one code point - just like the U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW in your example.

Re: Charset="WTF-8"

#102
post #22
post #3

Earlier quoted context omitted.

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.

It's super easy actually. Name consists of three parts -- Family Name, Given Name and Patronymic, spelled using Ukrainian Cyrillic. You can have a dash in the Family name and apostrophe is part of Cyrillic for this purposes, but no spaces in any of the three. If are unfortunate enough to not use Cyrillic (of our variety) or Patronymics in the country of your origin (why didn't you stay there, anyway), we will fix it for you, mister Нкріск. If you belong to certain ethnic groups who by their custom insist on not using Patronymics, you can have a free pass, but life will be difficult, as not everybody got the memo really. No, you can not use Matronimyc instead of Patronymic, but give us another 30 years of not having a nuclear war with country name starting with "R" and ending in "full of putin slaves si iiia" and we might see to that.

Unless of course the name is not used for official purposes, in which case you can get away with First-Last combination.

It's really a non issue and the answer is jurisdiction bound. In most of Europe extented Latin set is used in place of Cyrillic (because they don't know better), so my name is transliterated for the purposes of being in the uncivilized realms by my own government. No, I can't just use Л and Я as part of my name anywhere here.

Re: Charset="WTF-8"

#103
I totally get that companies are probably more successful using simple validation rules, that work for the vast majority of names rather than just accepting everything just so that some person with no name or someone whose name cannot possibly be expressed or at least transliterated to Unicode can use their services.

But that person's name has no business failing validation. They fucked up.

Re: Charset="WTF-8"

#104
I lost count of the projects where this was an issue. US and Western European-born devs are oblivious to this problem and it ends up catching them over and over again.

Re: Charset="WTF-8"

#105

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? :)

And the packages get there? Don't you put "Łódź (Lodz)" in the city field? Or the postal code takes care of the issue?

Re: Charset="WTF-8"

#106
post #82

Earlier quoted context omitted.

I know multiple developers who would just say "well it's their fault, they have to change name then".

I worked with an office of Germans who insisted that ASCII was sufficient. The German language uses letters that cannot be represented in ASCII. In fairness, they mostly wanted stuff to be in English, and when necessary, to transliterate German characters into their English counterparts (in German there is a standardised way of doing this), so I can understand why they didn't see it was necessary. I just never unders…

You should have asked how they would encode the german currency sign (€ for euro) in ASCII or its german counterpart latin1/iso-8859-1...

It's not possible. However I bet they would argument to use iso-8859-15 (latin9 / latin0) with the international currency sign (¤) instead or insist that char 128 of latin1 is almost always meant as €, so just ignore the standard in these cases and use a new font.

This would only fail in older printers and who is still printing stuff these days? Nobody right?

Using real utf-8 is just too complex... All these emojis are nuts

Re: Charset="WTF-8"

#107

Earlier quoted context omitted.

See point 40 and 32-36 on Falsehoods programmers believe about names[1] [1] https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...

I know that this is trying to be helpful but the snark in this list detracts from the problem.

Whether it's healthy or not, programmers tend to love snark, and that snark has kept this list circulating and hopefully educating for a long time to this very day

Re: Charset="WTF-8"

#108

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

You can grab JSON data of all ISO recognized countries and their address formats on GitHub (apologies, I forget the repo name. IIRC there is more than one).

I don't know if it's 100% accurate, but it's not very hard to implement it as part of an address entry form. I think the main issue is that most developers don't know it exists,

Re: Charset="WTF-8"

#109
post #97

Earlier quoted context omitted.

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.

Honestly I wish we could just abolish first and last name fields and replace them with a single free text name field since there's so many edge cases where first and last is an oversimplification that leads to errors. Unfortunately we have to interact with external systems that themselves insist on first and last name fields, and pushing it to the user to decide which is part of what name is wrong less often than str…

I did this in the product where I work. We operate globally so having separate first and last name fields was making less sense. So I merged them into a singular full name field.

The first and only people to complain about that change were our product marketing team, because now they couldn’t “personalize” emails like `Hi ,`. I had the hardest time convincing them that while the concept of first and last names are common in the west, it is not a universal concept.

So as a compromise, we added a “Preferred Name” field where users can enter their first name or whatever name they prefer to be called. Still better than separate first and last name fields.

Re: Charset="WTF-8"

#110
post #9

Earlier quoted context omitted.

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

What are “invalid names” in this context? Because, depending on the country the person was born in, a name can be literally anything, so I’m not sure what an invalid name looks like (unless you allow an `eval` of sorts).

The non-joke answer for Europe is extened Latin, dashes, spaces and apostrophe sign, separated into two (or three) distinct ordered fields. Just because it's written in a different script originally, doesn't mean it will printed only with that on your id in the country of residence or travel document issued at home. My name isn't written in Latin characters and it's fine. I know you can't even try to pronounce them, so I have it spelled out in above mentioned Latin script.
Post reply on HN