4 ms·
The key takeway is that the simplest handling or names (as an opaque unicode string which is not assumed to be stable or unique or conform to any particular str
by goto11 5y ago
The key takeway is that the simplest handling or names (as an opaque unicode string which is not assumed to be stable or unique or conform to any particular structure) is also the one which have the fewest problems.
The problems arise when you want to do more than just echo the name exactly as entered. Perhaps you want to show only last name in some context - now you assume everyone have a last name, and you are already in trouble.
Of course you can't always get away with treating names as opaque, so this is where you need to be very careful with the assumptions you make. The approach depends on the purpose of registering the name in the first place. For example if the purpose is to identify a person showing showing up to pick up a rental car, you just ask them to enter their name as it is stated on the drivers license. If you want to mail them a letter, ask for the name as it is stated on their mailbox.
There is no one-size-fits-all solution, but instead of worrying about the-artist-formerly-known-as-Prince or tribes communicating only with colored fabric, consider the use case for the name. If you have a web-shop you probably don't have to worry about orphan toddler refugees, but if you write software for hospitals you absolutely have to consider the case where the name is unknown. I'm sure Mr Artist-formerly-known-as-Prince has both a passport, credit card, legal name and drivers license, all with names representable as Unicode characters. The question is which one your application needs.
Btw. I find it amusing when web startups think they need a "web scale" distributed database system in order to be scalable to a billion users, but thinks handling characters outside of the ASCII-range is an obscure edge case which can be ignored.