| ▲ | croes 7 months ago |
| Is name validation even possible? |
|
| ▲ | perching_aix 7 months ago | parent | next [-] |
| In certain cultures yes. Where I live, you can only select from a central, though frequently updated, list of names when naming your child. So theoretically only (given) names that are on that list can occur. Family names are not part of this, but maybe that exists too elsewhere. I don't know how people whose name has been given to them before this list was established is handled however. An alternative method, which is again culture dependent, is to use virtual governmental IDs for this purpose. Whether this is viable in practice I don't know, never implemented such a thing. But just on the surface, should be. |
| |
| ▲ | Muromec 7 months ago | parent | next [-] | | >So theoretically only (given) names that are on that list can occur. Unless of course immigration is allowed and doesn't involve changing a name. | | |
| ▲ | taneliv 7 months ago | parent [-] | | Not the OP, but immigration often involves changing your name in the way digital systems store and display it. For example, from محمد to Muhammad or from 陳 to Chen. The pronunciation ideally should stay the same, but obviously there's often slight differences. But if the differences are annoying or confusing, someone might choose an entirely different name as well. | | |
| ▲ | chx 7 months ago | parent [-] | | Yes but GP said > Where I live, you can only select from a central, though frequently updated, list of names when naming your child I was born in such a country too and still have frequent connections there and I can confirm the laws only apply to citizens of said country so indeed immigration creates exceptions to this rule even if they transliterate their name. | | |
|
| |
| ▲ | bjackman 7 months ago | parent | prev | next [-] | | I still don't see how any system in the real world can safely assume its users only have names from that list. Even if you try to imagine a system for a hospital to register newly born babies... What happens if a pregnant tourist is visiting? | | |
| ▲ | Y_Y 7 months ago | parent | next [-] | | For example in Iceland you don't have to name the baby immediately, and the registration times are different for foreign parents.https://www.skra.is/english/people/registration-of-children/... Of course then you may fall foul of classic falsehood 40: People have names. | | | |
| ▲ | perching_aix 7 months ago | parent | prev | next [-] | | With plenty of attitude of course :) I've only ever interacted with freeform textfields when inputting my name, so most regular systems clearly don't dare to attempt this. But if somebody was dead set on only serving local customers or having only local personnel, I can definitely imagine someone being brave(?) enough. | |
| ▲ | onionisafruit 7 months ago | parent | prev [-] | | The name a system knows you as doesn’t need to correspond to your legal name or what you are called by others. |
| |
| ▲ | tomtomtom777 7 months ago | parent | prev [-] | | This assumes every resident is born and registered in said country which is a silly assumption. Surely, any service only catered only to "naturally born citizen" is discriminatory and illegal? | | |
| ▲ | lmm 7 months ago | parent | next [-] | | > Surely, any service only catered only to "naturally born citizen" is discriminatory and illegal? No, that's also a question that is culturally dependent. In some contexts it's normal and expected. | |
| ▲ | marcus_holmes 7 months ago | parent | prev | next [-] | | I read that Iceland asks people to change their names if they naturalise there (because of the -sson or -dottir surname suffix). But your point stands - not everyone in the system will follow this pattern. | |
| ▲ | perching_aix 7 months ago | parent | prev [-] | | Obviously, foreigners just living or visiting here will not have our strictly local names (thinking otherwise is what would be "silly"). Locals (people with my nationality, so either natural or naturalized citizens) will (*). (*) I read up on it though, and it seems like exceptions can be requested and allowed, if it's "well supported". Kinda sours the whole thing unfortunately. > is discriminatory and illegal? Checked this too (well, using Copilot), it does appear to be illegal in most contexts, although not all. But then, why would you want to perform name verification specific to my culture? One example I can think of is limiting abuse on social media sites for example. I vaguely recall Facebook being required to do such a thing like a decade ago (although they definitely did not go about it this way clearly). |
|
|
|
| ▲ | armada651 7 months ago | parent | prev | next [-] |
| Yes, it is essential when you want to avoid doing business with customers who have invalid names. |
| |
| ▲ | ryandrake 7 months ago | parent | next [-] | | 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! | | | |
| ▲ | Diti 7 months ago | parent | prev | next [-] | | 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). | | |
| ▲ | Muromec 7 months ago | parent | next [-] | | 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. | | |
| ▲ | throw_a_grenade 7 months ago | parent [-] | | Non-joke answer for Europe is at least Latin, Greek or Cyrillic (български is already one of the official EU languages!). No reason to treat them differently, just don't allow for mixing them so you won't get homoglyphs. EURid (.eu-NIC) gets it mostly right I believe. | | |
| ▲ | account42 7 months ago | parent [-] | | The non-theoretical answer for Europe is just Latin because the names need to eventually be read by people who don't know Greek or Cyrillic. |
|
| |
| ▲ | dgoldstein0 7 months ago | parent | prev [-] | | Obligatory xkcd https://xkcd.com/327/ |
| |
| ▲ | jandrese 7 months ago | parent | prev [-] | | What if your customer is the artist formerly known as Prince or even X Æ A-12 Musk? | | |
| ▲ | rsynnott 7 months ago | parent | next [-] | | Prince is still mostly screwed, even without spurious validation; Unicode doesn't allow personal symbols. Some discussion here: https://www.unicode.org/mail-arch/unicode-ml/Archives-Old/UM... | |
| ▲ | chungy 7 months ago | parent | prev [-] | | Prince: "Get over yourself and just use your given name." (Shockingly, his given name actually is Prince; I first thought it was only a stage name) Musk: Tell Elon to get over his narcissism enough to not use his children as his own vanity projects. This isn't just an Elon problem, many people treat children as vanity projects to fuel their own narcissism. That's not what children are for. Give him a proper name. (and then proceed to enter "X Æ A-12" into your database, it's just text...) | | |
| ▲ | jandrese 7 months ago | parent [-] | | Sure it is just text, but the context is someone who wrote a isValidHumanName() function. |
|
|
|
|
| ▲ | ValentinA23 7 months ago | parent | prev | next [-] |
| Don't validate names, use transliteration to make them safe for postal services (or whatever). In SQL this is COLLATE, in the command line you can use uconv: >echo "'Lódź'" | uconv -f "UTF-8" -t "UTF-8" -x "Latin-ASCII" >'Lodz' |
| |
| ▲ | poincaredisk 7 months ago | parent | next [-] | | If I ever make my own customer facing product with registration, I'm rejecting names with 'v', 'x' and 'q'. After all, these characters don't exist in my language, and foreign people can always transliterate them to 'w', 'ks' or 'ku' if they have names with weird characters. | |
| ▲ | notanote 7 months ago | parent | prev | next [-] | | The name of the city has the L with stroke (pronounced as a W), so it’s Łódź. | | |
| ▲ | poincaredisk 7 months ago | parent [-] | | And the transliteration in this case is so far from the original that it's barely recognisable for me (three out of four characters are different and as a native I perceive Ł as a fully separate character, not as a funny variation of L) | | |
| ▲ | Muromec 7 months ago | parent | next [-] | | The fact that it's pronounced as Вуч and not Лодж still triggers me. | | |
| ▲ | pavel_lishin 7 months ago | parent | next [-] | | I just looked up the Russian wikipedia entry for it, and it's spelled "Лодзь", but it sounds like it's pronounced "Вуджь", and this fact irritates the hell out of me. Why would it be transliterated with an Л? And an О? And a з? None of this makes sense. | | |
| ▲ | cyberax 7 months ago | parent | next [-] | | > Why would it be transliterated with an Л? Because it _used_ to be pronounced this way in Polish! "Ł" pronounced as "L" sounds "theatrical" these days, but it was more common in the past. | |
| ▲ | Muromec 7 months ago | parent | prev [-] | | It's a general pattern of what russia does to names of places and people, which is aggressively imposing their own cultural paradigm (which follows the more general general pattern). You can look up your civil code provisions around names and ask a question or two of what historical problem they attempt to solve. | | |
| ▲ | aguaviva 7 months ago | parent | next [-] | | It's not a Russian-specific thing by any stretch. This happens all the time when names and loanwords get dragged across linguistic boundaries. Sometimes it results from an attempt to "simplify" the respective spelling and/or sounds (by mapping them into tokens more familiar in the local environment); sometimes there's a more complex process behind it; and other times it just happens for various obscure historical reasons. And the mangling/degradation definitely happens in both directions: hence Москва → Moscow, Paris → Париж. In this particular case, it may have been an attempt to transliterate from the original Polish name (Łódź), more "canonically" into Russian. Based on the idea that the Polish Ł (which sounds much closer to an English "w" than to a Russian "в") is logically closer to the Russian "Л" (as this actually makes sense in terms of how the two sounds are formed). And accordingly for the other weird-seeming mappings. Then again it could have just ended up that way for obscure etymological reasons. Either way, how one can be "irritated as hell" over any of this (other than in some jocular or metaphorical sense) is another matter altogether, which I admit is a bit past me. | | |
| ▲ | aguaviva 7 months ago | parent [-] | | Correction - it's nothing osbcure at all, but apparently a matter of the shift that accord broadly with the L sound in Polish a few centuries ago (whereby it became "dark" and velarized), affecting a great many other words and names (like słowo, mały, etc). While in parts east and south the "clear" L sound was preserved. https://en.wikipedia.org/wiki/Ł | | |
| ▲ | int_19h 7 months ago | parent [-] | | Velarized L is a common phoneme in Slavic languages, inherited from their common ancestor. What makes Polish somewhat unusual is that the pronunciation of velarized L eventually shifted to /w/ pretty much everywhere (a similar process happened in Ukrainian and Belarusian, but only in some contexts). |
|
| |
| ▲ | int_19h 7 months ago | parent | prev | next [-] | | Adapting foreign names to phonotactics and/or spelling practices of one's native language is a common practice throughout the world. The city's name is spelled Lodz in Spanish, for example. | |
| ▲ | cyberax 7 months ago | parent | prev [-] | | Wait until you hear what Chinese or Japanese languages do with loanwords... |
|
| |
| ▲ | 7 months ago | parent | prev [-] | | [deleted] |
| |
| ▲ | notanote 7 months ago | parent | prev [-] | | L with stroke is the english name for it according to wikipedia by the way, not my choice of naming. The transliterated version is not great, considering how far removed from the proper pronunciation it is, but I’m sort of used to it. The almost correct one above was jarring enough that I wanted to point it out. |
|
| |
| ▲ | ajsnigrutin 7 months ago | parent | prev [-] | | Yeah, that'll work great.. https://en.wikipedia.org/wiki/%C4%8Celje echo "Čelje" | uconv -f "UTF-8" -t "UTF-8" -x "Latin-ASCII" > "Celje" https://en.wikipedia.org/wiki/Celje (i mean... we do have postal numbers just for problems like this, but both Štefan and Stefan are not-so-uncommon male names over here, so are Jozef and Jožef, etc.) | | |
| ▲ | jeroenhd 7 months ago | parent | next [-] | | If you're dealing with a bad API that only takes ASCII, "Celje" is usually better than "ÄŒelje" or "蒌elje". If you have control over the encoding on the input side and on the output side, you should just use UTF-8 or something comparable. If you don't, you have to try to get something useful on the output side. | | |
| ▲ | ajsnigrutin 7 months ago | parent [-] | | This depends. Everyone over here would know that "ÄŒelje" (?elje) is either čelje, šelje or želje. Maybe even đelje or ćelje if it's a name or something else. So, special attention would be taken to 'decypher' what was meant here. But if you see "Celje", you assume it's actually Celje (a much larger city than Čelje) and not one of those variants above. And noone will bother with figuring out if part of a letter is missing, it'll just get sent to Celje. |
| |
| ▲ | Muromec 7 months ago | parent | prev | next [-] | | Most places where telling Štefan from Stefan is a problem use postal numbers for people too, or/and ask for your DOB. | | |
| ▲ | ajsnigrutin 7 months ago | parent [-] | | I don't have a problem from differentiatin Štefan from Stefan, 's' and 'š' sound pretty different to everyone around here. But if someone runs that script above and transliterates "š" to "s" it can cause confusion. And no, we don't use "postal numbers for humans". | | |
| ▲ | Muromec 7 months ago | parent [-] | | >And no, we don't use "postal numbers for humans". An email, a phone number, a tax or social security number, demographic identifier, billing/contract number or combination of them. All of those will help you tell Stefan from Štefan in the most practical situations. >But if someone runs that script above and transliterates "š" to "s" it can cause confusion. It's not nice, it will certainly make Štefan unhappy, but it's not like you will debit the money from the wrong account or deliver to a different address or contact the wrong customer because of that. |
|
| |
| ▲ | account42 7 months ago | parent | prev [-] | | So? Names are not unique to begin with. |
|
|
|
| ▲ | poizan42 7 months ago | parent | prev | next [-] |
| 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?) |
| |
| ▲ | arsome 7 months ago | parent [-] | | name.Length > 0 is probably pretty safe. | | |
| ▲ | pridkett 7 months ago | parent | next [-] | | 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. | | |
| ▲ | Macha 7 months ago | parent | next [-] | | 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 string.split, so we're forced to become part of the problem. | | |
| ▲ | caseyohara 7 months ago | parent | next [-] | | 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 <firstname>,`. 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. | | |
| ▲ | cudder 7 months ago | parent [-] | | I tried this too, and a customer angrily asked why they can't sort their report alphabetically by last name. Sigh. | | |
| ▲ | caseyohara 7 months ago | parent [-] | | Just split the full name on the space char and take the last value as the last name. Oh wait, some people have multiple last names. Split on the space and take everything after the first space as the last name. Oh wait, some people have multiple first names. Merging names is a one-way door, you can't break them apart programmatically. Knowing this, I put a lot of thought into whether it was worth it to merge them. |
|
| |
| ▲ | arkh 7 months ago | parent | prev | next [-] | | One field? Like people have only one name... I like the Human Name from the FHIR standard: https://hl7.org/fhir/datatypes.html#HumanName People can have many names (depending on usage and of "when", think about marriage) and even if each of those human names can handle multiple parts the "text" field is what you should use to represent the name in UIs. I encourage people to go check the examples the standards gives, especially the Japanese and Scandinavian ones. | |
| ▲ | JimDabell 7 months ago | parent | prev [-] | | It’s not just external systems. In many (most?) places, when sorting by name, you use the family names first, then the given names. So you can’t correctly sort by name unless you split the fields. Having a single field, in this case, is “an oversimplification that leads to errors”. | | |
| ▲ | roywiggins 7 months ago | parent [-] | | Right, but then you have to know which name is the family name, which really could be any of them. | | |
| ▲ | JimDabell 7 months ago | parent [-] | | I’m not sure what you’re trying to get at. The field containing the family name is the one labelled “family name”. You don’t have two fields both labelled “name”; there’s no ambiguity. |
|
|
| |
| ▲ | cluckindan 7 months ago | parent | prev [-] | | some people have no name at all | | |
| ▲ | exitb 7 months ago | parent [-] | | Any notable examples apart from young children and Michael Scott that one time? | | |
|
| |
| ▲ | poizan42 7 months ago | parent | prev | next [-] | | See point 40 and 32-36 on Falsehoods programmers believe about names[1] [1] https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-... | | |
| ▲ | from-nibly 7 months ago | parent [-] | | I know that this is trying to be helpful but the snark in this list detracts from the problem. | | |
| ▲ | i80and 7 months ago | parent [-] | | 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 |
|
| |
| ▲ | tomxor 7 months ago | parent | prev [-] | | What if my name is | | |
|
|
|
| ▲ | zarzavat 7 months ago | parent | prev | next [-] |
| Presumably there aren't any people with control characters in their name, for example. |
| |
| ▲ | cobbzilla 7 months ago | parent | next [-] | | Watch as someone names themselves the bell character, “^G” (ASCII code 7) [1] When they meet people, they tell them their name is unpronounceable, it’s the sound of a PC speaker from the late 20th century, but you can call them by their preferred nickname “beep”. In paper and online forms they are probably forced to go by the name “BEL”. [1] https://en.wikipedia.org/wiki/Bell_character | | | |
| ▲ | ValentinA23 7 months ago | parent | prev | next [-] | | คุณ สมชาย 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. | | |
| ▲ | Saigonautica 7 months ago | parent | next [-] | | The reminds me of a few Thai colleagues who ended up with a legal first name of "Mr." (period included), probably as a result of this. Buying them plane tickets to attend meetings and so on proved fairly difficult. | |
| ▲ | pwdisswordfishz 7 months ago | parent | prev [-] | | But C0 and C1 control codes are out, probably. |
| |
| ▲ | lmm 7 months ago | parent | prev | next [-] | | > Presumably there aren't any people with control characters in their name, for example. Of course there are. If you commit to supporting everything anyone wants to do, people will naturally test the boundaries. The biggest fallacy programmers believe about names is that getting name support 100% right matters. Real engineers build something that works well enough for enough of the population and ship it, and if that's not US-ASCII only then it's usually pretty close to it. | |
| ▲ | pwdisswordfishz 7 months ago | parent | prev | next [-] | | Or unpaired surrogates. Or unassigned code points. Or fullwidth characters. Or "mathematical bold" characters. Though the latter two should be probably solved with NFKC normalization instead. | | |
| ▲ | chrismorgan 7 months ago | parent [-] | | > Or unpaired surrogates. That’s just an invalid Unicode string, then. Unicode strings are sequences of Unicode scalar values, not code points. > unassigned code points Ah, the tyranny of Unicode version support. I was going to suggest that it could be reasonable to check all code points are assigned at data ingress time, but then you urgently need to make sure that your ingress system always supports the latest version of Unicode. As soon as some part of the system goes depending on old Unicode tables, some data processing may go wrong! How about Private Use Area? You could surely reasonably forbid that! > fullwidth characters I’m not so comfortable with halfwidth/fullwidth distinctions, but couldn’t fullwidth characters be completely legitimate? (Yes, I’m happy to call mathematical bold, fraktur, &c. illegitimate for such purposes.) > solved with NFKC normalization I’d be very leery of doing this on storage; compatibility normalisations are fine for equivalence testing, things like search and such, but they are lossy, and I’m not confident that the lossiness won’t affect legitimate names. I don’t have anything specific in mind, just a general apprehension. | | |
| ▲ | account42 7 months ago | parent [-] | | > > Or unpaired surrogates. > That’s just an invalid Unicode string, then. Unicode strings are sequences of Unicode scalar values, not code points. Because surrogates were retrofitted onto UCS-2 to make it into UTF-8, they are both code units and (reserved) code points. |
|
| |
| ▲ | samatman 7 months ago | parent | prev | next [-] | | It's safe to reject Cc, Cn, and Cs. You should probably reject Co as well, even though elves can't input their names if you do that. Don't reject Cf. That's asking for trouble. | | |
| ▲ | chrismorgan 7 months ago | parent [-] | | Explanation for those not accustomed, based on <https://www.unicode.org/reports/tr44/#GC_Values_Table> (with my own commentary): Cc: Control, a C0 or C1 control code. (Definitely safe to reject.) Cn: Unassigned, a reserved unassigned code point or a noncharacter. (Safe to reject if you keep up to date with Unicode versions; but if you don’t stay up to date, you risk blocking legitimate characters defined more recently, for better or for worse. The fixed set of 66 noncharacters are definitely safe to reject.) Cs: Surrogate, a surrogate code point. (I’d put it stronger: you must reject these, it’s wrong not to.) Co: Private_Use, a private-use character. (About elf names, I’m guessing samatman is referring to Tolkien’s Tengwar writing system, as assigned in the ConScript Unicode Registry to U+E000–U+E07F. There has long been a concrete proposal for inclusion in Unicode’s Supplementary Multilingual Plane <https://www.unicode.org/roadmaps/smp/>, from time to time it gets bumped along, and since fairly recently the linked spec document is actually on unicode.org, not sure if that means something.) Cf: Format, a format control character. (See the list at <https://util.unicode.org/UnicodeJsps/list-unicodeset.jsp?a=[...>. You could reject a large number of these, but some are required by some scripts, such as ZERO-WIDTH NON-JOINER in Indic scripts.) |
| |
| ▲ | kijin 7 months ago | parent | prev | next [-] | | Challenge accepted, I'll try to put a backspace and a null byte in my firstborn's name. Hope I don't get swatted for crashing the government servers. | |
| ▲ | eyelidlessness 7 months ago | parent | prev | next [-] | | That sounds like a reasonable assumption, but probably not strictly correct. | |
| ▲ | baruchel 7 months ago | parent | prev [-] | | Mandatory reference: https://xkcd.com/327/ |
|
|
| ▲ | michaelt 7 months ago | parent | prev | next [-] |
| There are of course some people who'll point you to a blog post saying no validation is possible. However, for every 1 user you get whose full legal name is bob@example.com you'll get 100 users who put their e-mail into the name field by accident And for every 1 user who wants to be called e.e. cummings you'll get 100 who just didn't reach for the shift key and who actually prefer E.E. Cummings. But you'll also get 100 McCarthys and O'Connors and al-Rahmans who don't need their "wrong" capitalisation "fixed" thank you very much. Certainly, I think you can quite reasonably say a name should be comprised of between 2 and 75 characters, with no newlines, nulls, emojis, leading or trailing spaces, invalid unicode code points, or angle brackets. |
|
| ▲ | crazygringo 7 months ago | parent | prev | next [-] |
| 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.) |
| |
| ▲ | Seb-C 7 months ago | parent | next [-] | | > 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 | | |
| ▲ | crazygringo 7 months ago | parent [-] | | Very interesting about Japan! 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. | | |
| ▲ | Seb-C 7 months ago | parent | next [-] | | Ah, I see. I don't know, but I would bet that the sum of all corner cases and exceptions in the world would make it pretty hard to confidently eliminate any "obvious" characters. From a technical standpoint, unicode emojis are probably safe to exclude, but on the other hand, some scripts like Chinese characters are fundamentally pictograms, which is semantically not so different than an emoji. Maybe after centuries of evolution we will end up with a legit universal language based on emojis, and people named with it. | | |
| ▲ | crazygringo 7 months ago | parent [-] | | Chinese characters are nothing like emoji. They are more akin to syllables. There is no semantic similarity to emoji at all, even if they were originally derived from pictorial representations. And they belong to the {Alphabetic} Unicode class. I'm mostly curious if Unicode character classes have already done all the hard work. |
| |
| ▲ | account42 7 months ago | parent | prev [-] | | I imagine at least Sealand has relatively lax (or at least informal) restrictions. |
|
| |
| ▲ | poizan42 7 months ago | parent | prev | next [-] | | You forgot apostrophe as is common in Irish names like O’Brien. | | |
| ▲ | bloak 7 months ago | parent [-] | | Yes, though O’Brien is Ó Briain in Irish, according to Wikipedia. I think the apostrophe in Irish names was added by English speakers, perhaps by analogy with "o'clock", perhaps to avoid writing something that would look like an initial. There are also English names of Norman origin that contain an apostrophe, though the only example I can think of immediately is the fictional d'Urberville. |
| |
| ▲ | lmm 7 months ago | parent | prev | next [-] | | > I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? Some Japanese names are written with Japanese characters that do not have Unicode codepoints. (The Unicode consortium claims that these characters are somehow "really" Chinese characters just written in a different font; holders of those names tend to disagree, but somehow the programmer community that would riot if someone suggested that people with ø in their name shouldn't care when it's written as o accepts that kind of thing when it comes to Japanese). | | |
| ▲ | crazygringo 7 months ago | parent [-] | | Ha, well I don't think we need to worry about validating characters if they can't be typed in a text box in the first place. ;) But very interesting thanks! | | |
| ▲ | lmm 7 months ago | parent [-] | | > Ha, well I don't think we need to worry about validating characters if they can't be typed in a text box in the first place. ;) They are frequently typed in text boxes, any software seriously targeting Japan supports them, you just have to use Shift-JIS (or EUC-JP). So your codebase needs to actually support text encodings rather than just blindly assuming everything is UTF-8. |
|
| |
| ▲ | nicoburns 7 months ago | parent | prev | next [-] | | Apostrophe is common in surnames in parts of the world. | |
| ▲ | golergka 7 months ago | parent | prev | next [-] | | דויד Smith (concatenated) will have an LTR control character in the middle | | |
| ▲ | crazygringo 7 months ago | parent [-] | | Oh that's interesting. Is that a thing? I've never known of anyone whose legal name used two alphabets that didn't have any overlap in letters at all -- two completely different scripts. Would a birth certificate allow that? Wouldn't you be expected to transliterate one of them? | | |
| ▲ | golergka 7 months ago | parent [-] | | I haven't known anyone like that either, but I can imagine how the same person would have name in Hebrew in some Israeli IT system and name in English somewhere else and then have a third system to unexpectedly combine them in some weird way. |
|
| |
| ▲ | shash 7 months ago | parent | prev | next [-] | | There’s this individual’s name which involves a clock sound: Nǃxau ǂToma[1] [1] https://en.m.wikipedia.org/wiki/N%25C7%2583xau_%C7%82Toma | | | |
| ▲ | GolDDranks 7 months ago | parent | prev | next [-] | | What if one's name is not in alphabetic script? Let's say, "鈴木涼太". | | | |
| ▲ | Mordisquitos 7 months ago | parent | prev | next [-] | | > I'm curious if anyone can think of any other non-alphabetic characters used in legal names around the world, in other scripts? The Catalan name Gal·la is growing in popularity, with currently 1515 women in the census having it as a first name in Spain with an average age of 10.4 years old: https://ine.es/widgets/nombApell/nombApell.shtml | | |
| ▲ | enriquto 7 months ago | parent [-] | | beautiful map of the Catalan Countries when you search for that name here |
| |
| ▲ | jlhwung 7 months ago | parent | prev | next [-] | | https://en.wikipedia.org/wiki/Perri_6 | |
| ▲ | gus_massa 7 months ago | parent | prev [-] | | Comma or apostrophe, like in d'Alembert ? (And I have 3 in my keyboard, I'm not sure everyone is using the same one.) | | |
| ▲ | ahazred8ta 7 months ago | parent [-] | | Mrs. Keihanaikukauakahihuliheekahaunaele only had a string length problem, but there are people with a Hawaiian ʻokina in their names. U+02BB |
|
|
|
| ▲ | gmuslera 7 months ago | parent | prev | next [-] |
| You may not want Bobby Tables in your system. |
| |
| ▲ | malfist 7 months ago | parent [-] | | 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 | | |
| ▲ | account42 7 months ago | parent | next [-] | | This is all well and good until the company looses real money becaus some other system you are interfacing with got compromised because of your attitude and fingers start being pointed. Defense in depth is a thing. | |
| ▲ | gmuslera 7 months ago | parent | prev [-] | | There might be more than just 2 ends. And some of them may not be fixable by you. |
|
|
|
| ▲ | nkrisc 7 months ago | parent | prev | next [-] |
| It is if you first provide a complete specification of a “name”. Then you can validate if a name is compliant with your specification. |
| |
| ▲ | Muromec 7 months ago | parent | next [-] | | 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. | |
| ▲ | GrantMoyer 7 months ago | parent | prev [-] | | Valid names are those which terminate when run as Python programs. |
|
|
| ▲ | barryrandall 7 months ago | parent | prev | next [-] |
| Anything is possible with enough qualifiers and caveats. |
|
| ▲ | majkinetor 7 months ago | parent | prev | next [-] |
| Sure it is. Context matters. For example, in clone wars. |
|
| ▲ | rsynnott 7 months ago | parent | prev [-] |
| No, but it doesn’t stop people trying. |