309 comments

[ 3.9 ms ] story [ 259 ms ] thread
Who's checking if a string matches "null" rather than is null!?
Oh friend.... you have so much to learn
Any time "$var" is interpolated without check into an INSERT, and any maintainer finds it easier to just check for null as a string rather than ask a DB admin or committee to update the DB after a lot of red tape and risk assessment.

So... very often.

Guess I’ll change my name to ‘;drop table customers then ;)
You can make a good case to spend time sanitising requests to avoid catastrophic failure, but the "null" problem is one that quickly becomes a lot of work and risk to fix after the fact, for no obvious benefit except what's seen as the pedantry of some nerd, so it gets ranked all the way at the back of the list... until someone named Null comes along, and probably still even then.
I disagree. If your system is failing to correctly type check strings during SQL interpolation, you should probably kill it with fire.
I don't disagree... In most cases, it's not your system, though, it's someone else's.
> You can make a good case to spend time sanitising requests

> In most cases, it's not your system, though

You can’t pick and chose whether you own a system or not when presented with an opposing argument. That’s not how this works.

"System owner, we need to spend $10K to sanitise requests or a kid can destroy our business overnight".

"System owner, we need to spend $10K to clean up the database and code so that null and "null" are not the same thing, even though it works 99.99% of the time".

Do you see the difference?

If there are type confusion bugs related to SQL statements, I think SQL injection is likely to exist, if not some other super nasty bugs will eclipse it.

You can waste 10k paying someone to look at it or you could not waste your money, but I’d be fucked before I sign off on a system with those kinds of bugs as being secure, evidence or not. Someone higher up can accept that risk, but I’d rather not be liable when it’s breached or catastrophically damaged because some kid changed their last name to an SQL injection payload.

And yes, I’ve checked, in my country unpronounceable names are not permitted, otherwise I’d have one. There are existing case studies of this, iirc in the UK.

(comment deleted)
(comment deleted)
I don't buy that. The string "Null" is different from the keyword null in programming, so `if $var = null` would be false when $var is the string "Null".

Note that when interpolated into SQL, the contents of $var must be surrounded by single quotes, so you end up with `insert into Table (Name) values ('Null')`, which correctly inserts the string "Null" into the table.

If you were to leave off the quotes, you'd get a SQL syntax error for all other people, so that code would never make it into production. E.g. `insert into Table (Name) values (Smith)` is a syntax error.

> $req = "insert into people (name) ('$name')";

> $db.exec($req)

Now you have "null" as strings in the DB in any language that interpolates null as "null".

> select * from people where name is not null

"Why do we see nulls in testing? Damn, the DB has dirty data. Go through the trouble of fixing it, or...

> select * from people where name is not null and name != "null"

The end. Sorry Mr Null.

> I don't buy that.

I think you underestimate how many systems are stringly-typed, not just in terms of problematic programming languages, but data traveling between different APIs or through literal dead-tree paperwork.

They don't have to all fail at null handling, just one or two can gum up the works.

I don't buy that type-checkers would look at the value null, and say "Yep, that's a String/Integer/User". But here we are.
People who neither know, nor care, what they’re doing. When you’ve worked with people who are allowed to write code that interfaces with databases for more than about two weeks, you may be dismayed to see the large overlap between those two groups.
Plenty of systems represent all values as strings, and "null" is the obvious (although probably not the best) way to represent a null value as a string.
Which systems do this? I could see situations where reading in a text file, you have might assume the value null is not the string "null". I am struggling to think of other situations.
Bash, C strings, URL query strings, and CSVs off the top of my head.
C definitely does not represent null as a string.
No, but it also doesn't let you store null in a string variable.

Well... it does, but that would just be an empty string.

In C, and many other languages at that, strings are just arrays of bytes.

So you absolutely could store null in a string... It is even a valid ascii and UTF character. Now most string handling functions treat it as the end of a string in C but that is only by convention.

How you would display null to a user is a different story all together but representing it in a string is not an unsolved programming problem, generally its when you need to actually display null that it becomes a hard problem because how do you display the absence of something, specifically when a space is not an absence.

How do you serialise a string... Well it's already serialised given your specific endianness... So you just indicate that... This is 280 bytes of UTF8 data... It can contain as many nulls as you like, until you get 280 bytes of data you don't have all of it.

There is a difference between storing a string with only a null character (i.e. an empty string) and a proper null (i.e. the absense of value). That is what I was getting at when I listed "C strings" as an example.

Since in C strings are quasi-arrays and arrays are quasi-pointers there is probably a way to use a null pointer, but this would be a local convention for getting around C's lack of native support for null values. You couldn't expect it to be supported by utilities or libraries.

There’s a few condescending answers here. You will find this more common in weakly typed languages like PHP and VB and maaaaaybe JavaScript, where null == “null” will probably evaluate to true.
(comment deleted)
js doesn't have this particular problem, but it does have both `null` and `undefined`, which will have varying semantically different usages depending on local conventions.

For example, some will prefer to use `null` to mean that a value is _intentionally_ missing (for example, the db explicitly returned a null value), while `undefined` does not have any such connotation. These exist for frontend engineers to navigate decisions often far removed from their influence.

Anyway, `null != ''` and `null != 'null'`, but `null == undefined`. However, `null !== undefined`.

A lot has been made of js Truthy/Falsy equality operator, but most js programmers will take steps to actively avoid it coming into play. Probably the `void` operator is still under-used though in frontend code, though, since there's some pretty surprising legacy things that can happen when interacting with DOM APIs (like `checkbox.onclick = () => doSomething()` resulting in different checkbox behavior depending on whether or not `doSomething` returns a boolean or undefined).

I would call myself a relatively good developer and I fully understood type checking occurred via ===, and compare by value caught me. In my defence, I assumed this was less of an issue in modern JS, but thou shall not break backward comparability, apparently.
I treat usage of `==` in JavaScript as undefined behavior.
I kinda want to change my middle name to "undefined" now.

I wonder if I could legally define my middle name as starting with a lowercase letter.

I can confirm that PHP doesn't have this problem.

<?php

if ("null" == null) { echo "true"; } else { echo "false"; }

prints "false"

Is this php5 or a more recent version? That is hugely relevant when it comes to pho and something I should have mentioned in my original post (no idea if this specific thing would work in pho5, but there are other weird things)
People who know that the majority of people are stupid and will mess up even nulls.
There's plenty of name=Null, name=Undefined, name=Unknown entries in OpenStreetMap. Some are real places, some are mistakes, not easy to tell especially for restaurants or bars.
(comment deleted)
(comment deleted)
I'd guess some data transferred between systems as a homemade CSV. Empty field = empty string, but some field is nullable so someone decided that Null would be a way to declare a null field.

20 years later and multiple systems depending on each others, random hidden CRONs in the middle and now people called Null have a problem.

This happened to a kid in my high school. Last name null, broke the system they used to print report cards.
Why is this mandatory? Who made the mandate?
It’s a bit. It’s quite popular to link an xkcd whenever it’s relevant, along with one of a few different catch phrases. “Mandatory” being one of those. For this phrase in particular, the joke is that there is usually an xkcd for most situations, and that it is our “duty” as nerds to link to the appropriate one. It’s an inside joke for nerds. I hope this explains the custom to you.
> It’s an inside joke for nerds.

I love inside jokes. I hope to be a part of one someday.

Bobby tables has a gun on my back
I would say that the name didn't break the system, it just revealed that the system was always broken.
my have a ç and during first 10-15 years all system broken and my "vat" first letter is 0 same problem, if the dba genius use integer random bugs happen :(
I knew a person who's full name was `Mai Null`.

It always made me laugh because "Mai Null" means "never null" in Italian and because he's had plenty of issues due to his family name.

That should be part of every test suite
For many years, my mother's proper legal name on her birth certificate was the empty string. This wasn't usually a problem before computers as she'd go by a given name instead, even on government paperwork. She started having issues with systems being unable to process her information in the late 90s and early 2000s. Background checks would fail, passports couldn't be issued, and so on. She eventually had it changed, but I imagine it'd be even worse now.
There must be an interesting backstory here. Did her parents deliberately not name her? Did they forget?
I mean.. there are tons of people without last names in the world. https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-...
And first names, which causes some government agencies to put FNU in that field for "first name unknown".

My mom told me about a time they had someone with that situation at work, and people would call the person FNU until they were corrected.

FI²N sounds like a nice first name (Fuck If I Know)
Well if you have one name, that's your last name.
I assume you're making a joke. In any case, no that's not true. Because if it's your first and last name and you type it in both fields, you are now screwed in a different way.
The hospital staff filled out most of the birth certificate, but left the name field blank when they gave my grandmother the paperwork to take home. She either didn't notice or didn't care (both possibilities are realistic) that the name field was blank and submitted it anyway. The state accepted it.

My mother started filling out her own paperwork around elementary school because my grandmother created so many problems that school staff would simply give up.

A high school teacher of mine didn't have a last name, only a first name. Problem was when she moved (from India) she had to have a last name because a bunch of systems and people assume a last name as a fact, so her full name is just her first name twice because she didn't want to think of a different one :p
I have known 2 people with names so long they have the same issues.

One russian, one spanish. Both had like 20 individual names.

The problem is well meaning parents used all of them on early paperwork, and as things digitised, name fields gained field limits etc.

I believe one had his name changed formally, and the other had to register an alias, and had to dig out the OG paperwork regularly.

I have my own mildly amusing story of breaking systems with my name. I have a twin with the same first initial. Any time we had to use a system at school which constructed usernames from some combination of first initial, surname, and date of birth, only one account would be provisioned between the two of us.

It became almost a ritual in the first term of the school year for us to make a visit to IT Support and request a second account... there was always a bit of contention between us about who got the 'proper' username and who got the disambiguated one!

It's weird that none of the systems automatically fell back to disambiguating with a number or something similar if the 'proper' one already existed. I'm wondering if you were a year or two apart instead, would the system simply silently fail to create a new username for the younger sibling when they joined?
If they were a year or two apart the DOB would have disambiguated it.
At my school you were provisioned as <two-digit-start><first-three-firstname><first-three-last-name>. e.g. Joe Bloggs starting in 2000 is 00joeblo

Cue problems when two "Simon Smith" join in the same year. They were given 00simsmi and 00smisim I think.

I am pretty sure they spent 7 years at school forwarding each other email as various teachers assumed the default would work.

A former employer had a first letter of given name + last name (actually first 5 letters) convention for email addresses. They did have a fallback--usually with second letter of given name. But, of course, a lot of people just automatically emailed the convention with the result that certain email "twins" got misdirected mail.

A very common one at one point was that the CFO shared a first letter of name with his daughter. As I recall, he actually had the email in the usual convention so it's not like his daughter was receiving lots of highly confidential financial info but there was regularly misdirected mail.

> A former employer had a first letter of given name + last name (actually first 5 letters) convention for email addresses

I once heard a story (possibly apocryphal) about a place which used a similar “first initial and truncated surname” convention for usernames, except theirs was first three letters of surname, followed by first initial, followed by some digits. And it all worked great until they hired a guy named Tom Cunningham

I knew a Steve Penington who broke a user id scheme.
Bob Matt Derrick once told me of a facility whose maintenance supervisor was named Stuart Pedaso and he nearly had an aneurism from laughter. Secretary there didn't get it.
You know, it took me ages to finally get this… first three letters of first name plus first three letters of surname. Does that mean I’m his login?

(And the last three letters of his surname sound a bit like another word, but adding that to his login as well ruins my dad joke.)

haha i didn't even think of the "stuped" - his racuous laughter was at "stuped aso"
Meanwhile, friend of mine's last name was Li, and IDs were first initial + last name + #

Her number had three digits.

I'm guessing it's the birthday that really messed the system up though?

Very common last name for Chinese and places like universities usually don't ever re-issue a username. So the "first-initial + last name + number" approach can get into triple digits easily.
I set-up a directory system for a small school. The students logins were a combination or initials and date of birth. When I created the scheme I knew that a set of twins would break the system. Somewhere between 3 and 5 years we finally got a set of twins that needed to modify the system. I called them to my office and found out which one came out first and appended 1 their usernames and 2.
I anticipated twins with The school directory sync system I made for a small District (sub-5000 enrollment). I appended a random two digit number to first initial, last name (EAnderson96). So far none of the parents who have "weaponized"(1) the naming of their children have managed to break it since we brought it up in '99.

(1) Hypothetical John Smith and his siblings Jane Smith, James Smith, Janet Smith, Jack Smith, etc. It's a bit infuriating how many parents do this. Amusingly I've had O'Brien and other apostrophe-contsining names with no ill effects (because I sanitize my inputs). In the last couple years, though, I was forced to start dropping apostrophes because we had third-party apps/services we were syncing to that couldn't handle them.

I love seeing what the apostrophe in my last name breaks when I sign up for services.

Converting it to an HTML character entity is not really expected behaviour, but it was among the most amusing I’ve seen.

O&apos;Brien was it? Bonus points if you edit the profile and those are expanded too. Hello Mr. O&amp;apos;Brien.

I have an apostrophe too and it broke many websites. It was also a natural source of SQL injection detection.

About 20 years ago, I was able to see a bit more than what I supposed to from the Ikea website. Nowadays, I see mostly encoding issues, especially in notification pop-ups.

Apostrophe names were always my go-to for plausibly deniable checks for SQL injection.
I wonder if developers have a different naming convention for their children... Even on a subconscious level
I joked with my wife about using numbers in our daughter's name (k-rad 31337 style, with the first "letter" being a 3). I thought it would probably shake-out crappy software. In the end I knew it would be a mean thing to saddle the child with. It sounded like fun, though.
I’m a twin and my parents never told us who was ‘first’.
They probably don't know. If you're identical, babies are mixed-up for sure during the stressful first couple of days.

There's probably a medical document somewhere with the exact time of birth, but no way of knowing who's it really is.

Do you think it was an equality thing?
In Severance S2E1, Mark W says to Mark S: "Would you be open to using a different first name to avoid confusion?"

Did anyone ever ask that of you or your twin?

A coworker used to work in a meatpacking plant. There were two people who had the exact same name, first middle and last. They worked in the same department and in fact on the same machine.

They were both named Jose. One went by, pronounced, Hose-A, and the other Hose-B.

Apparently the Jose's, coworkers, and HR were all fine with this because it was simply too confusing otherwise.

No one ever asked us that which is good because I don't think either of us would have been much impressed by the suggested :p
My university was [initial][lastname][year][letter][letter]@school.com, allowing for 26^2 people to have the same initials and last name every year.

Despite having a rare last name and no twins, I was "AC".

Was it confirmed to be sequential (AA, AB, AC, …)? Because it could’ve been just a random sequence-looking pick from the available space. Sort of like getting #0003 on Discord when they still had random numbers in usernames.
I never know whether to use the ć in my name when signing up for systems that require full legal names (banks et al.). Even my own country's gov't sites break when I input my real name, but refuses to accept the name without the ć. It was a real pain in the ass when I had to make an appointment and go in to some dingy office at 6am because their system doesn't support one of the most common letters in Serbian names. There's like a 90% chance the dude who made the system has a similar name with a ć or č in it even!

Surprisingly this has never broken for me in either Indonesia or the Netherlands though, whenever I've put the ć in it just converted it to a regular C which is perfectly acceptable for me (for context, it's pretty easy to guess which C is actually a ć or č in Serbian, similarly for s/š or z/ž, so seeing text without the proper diacritics doesn't really matter in most cases). My Dutch ID even correctly has the ć!

My first name starts with the 'letter' (digraph, actually [0]) IJ.

I have a standard email I send to companies not honoring the only correct Dutch spelling of my name and/or initials.

The GDPR makes it mandatory for companies to correctly process your personal details so while it can take a while sometimes it's gotten a lot better over the years.

In your case (assuming you live in the EU) there's plenty of precedent to send a standard email like that too. Even banks have been forced kicking and screaming to fix it [1].

[0]: https://en.m.wikipedia.org/wiki/IJ_(digraph) [1]: https://shkspr.mobi/blog/2021/10/ebcdic-is-incompatible-with...

The number of times that a website rejects my first name because it has a hyphen in it, even in 2025, is astounding. I get told all manner of things by support staff, like "just leave it out" as if it's just not an important part of my name or anything.
Same, as someone with two middle names. Both scenarios are very common.
I’ve wondered about this myself, though I only have one middle name. Do you typically enter both middle names into the “Middle Name” form field?
Not the person you asked, but I also have a 2 word middle name. I enter both but it's a crapshoot as to whether it will take the first, the second, or both. I think a lot of older systems could handle 2 words in the first name (e.g. Joe Bob or Mary Ann) but not the middle.
If your full name is John Charles Paul Jacob Smith, then by definition the middle name is "Paul" right?
I have two middle names, in fact in my country legally we go with 4 names [first name, father's name, grandfather's name, and last name]. It is always a guess game when converting to only 2 names systems. In many cases I'd just go with my first name field including all of the first 3 names just to match the passport (especially for airflights booking).
I have two and it has never been a big problem. Anything official will have a 'middle name(a)' section and you just put both in there. I think it is sufficiently common that official systems deal with it. I have occasionally had the second one dropped but not on anything very official.
(comment deleted)
I can beat this. My wife's maiden name was in the form "Jane Angela Smith". When we got married, she changed it to "Jane Smith Jones", first name Jane, middle name Smith, last name Jones. Someone at the Social Security Administration entered it into their database as first name "Jane", no middle name, last name "Smith Jones".

Now, for fun, no one noticed this for about 25 years. Her Social Security card says "Jane Smith Jones". Her driver's license says "Jones, Jane Smith". Her US passport says "Jones, Jane Smith". But another part of the federal government says "Smith Jones, Jane". We only found this out when she tried to renew her driver's license recently and the clerk was like, "hey, this isn't matching up right...". A month later, the TSA clerk at the airport stopped her to ask why her passport didn't match her federal records.

So now we're paying $400 to legally change her name from "Jane Smith Jones" to "Jane Smith Jones". That's what the notice they make you pay to run in the newspaper says, anyway.

This is now my go to story about name nonsense for a while.
I think it's kind of hilarious even though it's an expensive pain in the neck. There's nothing we can do to make it go away on its own, so we might as well find the humor in it.
i have a tangential story that i wonder how many entropy i'll leak telling it.

My youngest, when he was born, was unable to get a birth certificate, and was listed as some last name that isn't the mom's or mine (it's because we couldn't track down her 15 year estranged "husband" and louisiana law is... French.) I had to do a paternity test, but that's it, other than hiring a lawyer. The lawyer pushed everything through. I don't "rightfully" own my last name (and i was the last one in the world, damnit!), so we told the lawyer to tell the state we wanted the mom's last name. It has much more known history to her and grandma, etc. I'm the only one in my tree, except the kid.

anyhow the state said "NOPE, DAD'S LAST NAME" so now the kid, instead of being burdened with a last name that looks like a cat fell on your keyboard, has my last name, which is two words.

which is apparently not fixed after me being around for 45 years, and my dad for like 20 years before that in the US.

It seems like this is relatively critical stuff, you know? it can interfere with bank accounts, school financial support, taxes, retirement, and you won't know until you hit each obstacle.

I am so sympathetic. It shouldn't be that hard, huh?
The father of an acquaintance of mine, still a child at the time, migrated from Spain to Argentina with his uncle. On arrival, the uncle was asked for his name. "Guzman y Gomez", he replied, meaning himself (Guzman) and his nephew (Gomez).

End result: both father, uncle and all their offspring now have "Guzman y Gomez" as their last name.

(Yes, this is a pseudonym. No burrito for you.)

or people whose middle name is their first name.
Hey, that's also relevant to me! I've checked my local laws, and where I live, your legal name is the one you consistently present yourself as. If you're Joe Frank Smith, and you go by Frank everywhere, that's your legal name.

I've gotten so tired of having this argument. Inevitably some clerk will insist on calling me by my first name, "you know, your legal name". No. My middle name is my legal name. It's what my mom, sisters, wife, friends, teachers, coworkers, doctors, and everyone else call me. My first name is an aka at best, except the only people who insist on using it are ones wrong about the law, so I'm not even really "known as" it.

I once closed a bank account 10 minutes after opening it because they insisted that my debit card be printed as "Joe Smith", not "Frank Smith". I told them I'd absolutely refuse to touch it because that's not my name. I find it interesting that it's mostly local orgs who are a pain in the neck about being wrong about this. You'd think a small local bank would know local law better than a huge multi-national, but the giant bank I opened a business account with was totally fine putting Frank Smith on my accounts. Go figure.

(Somewhat related: That's made me super sympathetic to trans people who want to be known as something other than what's written on their birth certificate. Yeah, I get it. It's nails on a chalkboard when someone calls me Joe, so if you don't want people calling you Tammy anymore, I'm on your side.)

This is technically the law in California, too (and possibly that’s where you live) but in practice the ability to do common law name-change has been abolished at a bureaucratic level.

Since at some point everything official now routes back to either a passport, an immigration/naturalization document, a court-issued name change doc, or a marriage certificate, those are effectively the only ways your name can be changed.

The problem is that all the law can do is make it legal for you to use whatever without it being considered fraudulent to try. But if your law is like CA’s it doesn’t specify other institutions other than possibly state government ones have to honor that and, in particular, it can’t constrain the federal government at all.

So that leaves the DMV as the one possibly effective way to do common law change, on the off chance somewhere will just accept your license as proof of identity. But now that driver’s licenses are subordinate to passport info or equivalent via Real ID, that route is pretty much toast too.

You might still be able to get the alternative state-only DL / state ID with a common law name, and maybe open a bank account with that, but then the credit reporting companies (or Chexsystems) don’t have to honor it so you’re possibly screwed anyway. Plus without a Real ID you’ll have to show a passport to fly domestically, and that will have the name you don’t like.

And, of course, none of this helps with your paycheck because you can’t satisfy an I-9 with a DL. It requires a federal document, too, which—if your state info doesn’t match your federal info—needs to be a fully identifying federal passport/equivalent. So even if you get the bank account with your chosen name, you might run into issues with your checks being to a different one.

At this point, it’s just not worth trying common law name change anymore. You either flip a few hundred for the official change or you accept the fact that you’ll have a public name and a private name.

(And I say this as a “Geo” who strongly dislikes seeing “George Jr” on stuff so I feel your pain. I just tell my employers that my given name only goes on paychecks, benefits, and tax forms, and is to never be used publicly. That has always worked.)

That's what I do, too. If you have to put Joe on the paperwork, fine, but call me Frank.
Curious, if you don't like it why not change it?

Then you can be Frank Smith all the time.

It’s an old family name. I’m the 8th one to have that first name. My kid’s the 9th. I’m proud to have the name, but it’s not what I go by.
Re banks: My bank refused to update my name on my accounts after I authenticated with my card, showed them my passport, name change form and deed poll, as, and I quote, "anyone could have done that". Like yes, I believe that's the point of a deed poll? And what more evidence did they want to prove it was me trying to change the details on my own account?
Sweden has a sensible solution to this (im sure others do too). When you register a name you specify which part is the tilltalsnamn (lit. name of adress). In your case, the names would be disambiguated as Joe Frank Smith and Joe Frank Smith.

Not all systems use that piece of information, but most do.

Yes. I'm Swedish and American TSA/airport security not understanding this is why I mentioned it.
But how are all those people supposed to know that beforehand? Call yourself whatever you want but don't expect anyone to deal with your name-fuckery. It's called first name for a reason.
Indeed. My passport correctly includes the hyphen in my surname. Air New Zealand doesn't support spaces or hyphens so my surname is written out as both words concatenated (i.e. Onetwo). Qantas doesn't support hyphens but does support spaces so my surname is written out as two words (i.e. One Two).

Thankfully apparently this is common enough that I've had tickets including travel on both airlines (as Qantas cancelled a flight and ticketed me on Air New Zealand instead) traveling internationally work just fine. Even things like the automated customs gates work fine. I suspect under the hood their systems just strips out all non-alpha characters and compares that (i.e. 'onetwo' == 'onetwo').

Online/moible forms can be an issue tho. Spark, the biggest mobile phone carrier in New Zealand, doesn't support hyphens in account names, just to name one silly example.

I've got the same problem with a hyphenated name, and it was always the way they phrased the error messages that annoyed me. Porter Airline's error message for the longest time was "Your Name is Invalid". No, my name is valid, your system doesn't support it.

I ended up having to contact their support quite a few times for them to fix the error message. Still doesn't work, but at least the error message is reasonable now.

> I suspect under the hood their systems just strips out all non-alpha characters and compares that (i.e. 'onetwo' == 'onetwo').

That would be the MRZ version. The identity page of your passport has a blob of monospace text at the bottom that's used as the 'canonical' version of names for most or all air travel systems.

> Even things like the automated customs gates work fine.

I would like to think (Perhaps naively?) that these systems key off your passport number/ID (which is by construction, not subject to these problems) to deliberately side-step issues like this.

The airline/travel systems are full of this stuff.

I have mostly documents that include my full middle name, and the way half or more of air travel systems deal with that is to just crunch the first and middle into one name.

But: it all works fine.

And the ones that are too incompetent to strip (or add) hyphens to phone numbers.

Or handle single-digit month numbers in a date.

Or...

My wife is Korean. The anglicized version of Korean given names always has a space in it. This makes for a few kinds of broken naming schemes - like removing the space or the second half of the given name becomes the middle name, or the second half of the given name just truncated entirely.
In Singapore given names can have more than one space and may not be a substring of the full name. The first prime minister has the full name "Harry Lee Kuan Yew" where Lee is his family name and "Harry Kuan Yew" is his given name. (Later in life he dropped "Harry" from his name.)
To be more precise, many Singaporean Chinese names are formatted as WESTERN_NAME SURNAME CHINESE_FIRSTNAME_1 CHINESE_FIRSTNAME_PART2. The WESTERN_NAME may or may not be a legal name (AFAIK for Lee Kuan Yew it never was), and to further complicate things it's not unknown for the Chinese name to be duplicated in its dialect and Mandarin readings, leading to "Harry, Lee Kuan Yew (Li Guangyao)".

Combine this with Anglocentric IT systems, and I'm sure Mr Lee (RIP) gets a lot of spam addressed to "Mr Yew".

I get this in reverse. My surname is Parks, and my given names are Paul Moore. Since moving to Singapore I've become accustomed to answering to "Parks Paul Moore" in person or on the phone.

Surprisingly, local systems outside of the SG government can still take a maddeningly Western approach to names (First name/last name, assumption that last name is a family name a not a patronymic, etc.). My wife is Singaporean Tamil, so her "last name" is actually her father's given name, and even when travelling around Southeast Asia she encounters issues with this.

Fortunately, the SG government does an admirable job of handling Chinese names (across a number of languages and cultures), Malay names, Indian names of various cultures (mostly Tamil, but also Punjabi, Malayalam, and several others) and of course many Western names. I wish the Western world would catch up.

Some people here have an apostrophe. Names like Ainul can be 'Ainul. And I guess the Bobby Tables equivalent is Ai'null. It's due to arabic sources, where A and A' are different letters like o and ö. I used to do some consulting for the home ministry, and these legal names are all over our databases.

I imagine apostrophes would be a complete nightmare for most countries to sanitize or validate.

I legally changed my name to drop the hyphen. I kept an accented character, but don't use it for legal documents or plane tickets.
It drives me mad when various forms sternly requires me to enter my name "as it is spelled in the passport" only to tell me that my name is "invalid" or "incorrect" or "not allowed". Then we have the systems that have non-standard transliteration rules …

I have never been known by more than one name, but the spelling sure differs.

It's annoying that airlines writes "as spelled in passport", when what they really need is an upper case alpha-only version of your name.

But it is also equally annoying that passports don't clearly spell out a "international and systems compatible" version of your name.

We've had Airlines for way over half a century, and visas for about as long as we have had passports and people still walk around with international identification documents that cannot be understood by travel and immigration agencies internationally.

> But it is also equally annoying that passports don't clearly spell out a "international and systems compatible" version of your name.

They do in the machine readable area. Maybe not "clearly".

The passport machine area replaces Ö with O but most German airlines replace Ö with OE.
What they probably mean is the name as it’s spelled in the MRZ (the ‘Machine Readable Zone’, the two lines at the bottom of the passport), which is also stored in data group 1 in the embedded chip. Passports can also contain the full name in UTF-8 in data group 11, but this is an optional field.

The MRZ can only contain the characters A-Z (uppercase), 0-9 and <. ICAO document 9303-3 describes conventions for transliteration of other characters into this limited character set.

I‘m laughing in Brazilian… we (and certainly my case) tend to have so many family names plus particles (like „de“ or „junior“) that often the full name does not fit in forms, which leads to cropping my family name(s) or removing spaces, sometimes both. And then in some forms such as airlines where the family name is the username I have to try a few different combinations to „guess“ which is the one the airline‘s systems used for me.
There's a number of websites and forms that reject entire domain names for email that have a hyphen in it, despite a hyphen being perfectly valid in modern DNS usage and domain names in every ICANN TLD.
(comment deleted)
I think we should all embrace a future where legal names are just straight up binary streams.

I can finally realize my true potential and be recognized as Mr. “:100 emoji:(Unicode zero-width joiner):fire emoji:(null character)(base64 encoding of a QR code that links to a website with a photo of my face),(vcard data, recursively referencing this last name somehow)”

That discriminates against people whose names cannot be written in Unicode. You need to include the ability to accept various image formats, as well as audio for names that don't have a written form.
(comment deleted)
E. Musk son’s name will be fun. Hyphen, number and uncommon unicode character.
I have 4 names (two first names and two surnames), pretty common thing in my country. But I've had issues several times when flying because they assume it's two different people? How stupid is that?
I have one airline that just tacked my middle name (which I basically never use) directly onto my first name for my account. It's never been an issue so I haven't ever gone to the trouble of correcting it but it means I always have the "wrong" first name on my tickets relative to my official IDs.
Yeah, why aren't names quoted in these systems? It seems that this Null problem is specific example of failure to quote strings properly.

What about last names like "da Silva"?

Related: Null Island [1]

> Null Island is the location at zero degrees latitude and zero degrees longitude (0°N 0°E), i.e., where the prime meridian and the equator intersect. Since there is no landmass located at these coordinates, it is not an actual island. The name is often used in mapping software as a placeholder to help find and correct database entries that have erroneously been assigned the coordinates 0,0.

[1] https://en.wikipedia.org/wiki/Null_Island

My name, Ĝonatano, contains a ĝ, which is an uncommon letter outside of my language, Esperanto. But when I go to set my username to "ĝonatano," I'm often told that usernames "may only contain letters or underscores," as if ĝ weren't a letter. (You can see that I've approximated it in my HN username, but I don't need to do that on web services that correctly understand that letters exist outside of ASCII and Latin-1.)
To be fair, Esperanto is, as far as I can tell, not very widely used. The letter ĝ mostly returns Esperanto results. Using that letter in a place where others may need to communicate or type the letter would be a severe burden on almost anyone else you interact with, outside of Esperanto communities.

I'm sure there are plenty of people who share your frustration with accented letters, ñ, umlauts, etc, though. I'd hope that most systems can handle those letters, although I wouldn't hold out hope that Ĝ/ĝ would be high on the priority list.

> as far as I can tell, not very widely used

Well, it's the most widely spoken international language, spoken in over a hundred countries, by an estimated 2-5M people. There's a rich literature (probably 30-50K books), vibrant music scene, and support in open source software (Linux, Firefox, Google products) is usually pretty good.

But the issue is not how widely Esperanto, or any other language, is spoken. If you assume that languages should only be supported according to their number of speakers, you leave no room for useful languages, bridge languages, auxiliary languages, or growing languages. Even if Esperanto had only 100 speakers, it'd be worthwhile to support, if it's easy to learn, and easy for non-speakers to understand.

It's not a "severe burden" to consider non-ASCII letters as letters. Unicode is pretty straightforward to work with, and if you want to support more than just English, it's a necessity. There's no need to have a "priority list" of letters you consider more or less important than others. That attitude comes across as very Anglocentric.

(comment deleted)
What is the definition of an "international language" that makes Esperanto the most widely spoken one? Isn't Arabic an international language, for instance?
For that matter, isn't English?

It's an official language in many countries, such as South Africa, India, and Ireland, each of which has other official languages.

Especially in Asia, where it's not exactly a primary language for anyone. It's funny that you'll be in a room with Chinese, Egyptians, Pakistanis, Indonesians, Ukranians, and everyone will speak English. I once saw a documentary which went deep into Borneo, via rivers, to a tribe that didn't wear shirts, and they spoke fluent English too.
I think the point is that of intentional international languages (i.e., international in the sense of not being tied to any particular country), Esperanto is the most widely used one.

That still is going to be a quite small number against English, Spanish, French &c. in terms of being a lingua franca.

> It's not a "severe burden" to consider non-ASCII letters as letters. [...] That attitude comes across as very Anglocentric.

Maybe I didn't communicate my thoughts clearly - the reason I call it a "severe burden" is because people won't know how to type it or how to pronounce it. I doubt many people have the ability to type the letter, and would have to copy-paste it. Even on Mac, where most diacritical characters are an opt+key away, the "ˆ" does not apply to the letter "g", resulting in "ˆg". "ĝ" would need to be treated the same as, for example, "¯\_(ツ)_/¯" - where users generally google it and then copy-paste it. Sure, there are ways to allow for easier retrieval (ex. I have "@shrug" set up to make the shrug), but most people will very rarely encounter "ĝ" or similar, and won't have a shortcut set up.

You also can't put in Cyrillic or CJK characters. It's a user name, not a human name, you should be fine just using the 26 ASCII letters for it. Basically anything that is a computer-centric string should be only ASCII and nothing else, because supporting all of human writing is a never-ending task.
Are you a native speaker of Esperanto?
that would be so nice
When I do a Ctrl+F search for “Gonatano” one of the search results is the actual name as typed with the circumflex. I think that is kind of a handy feature of the browser I’m using but at the same time it is sort of weird since it technically is not the same name without the circumflex, right?

Also not all database systems would think the non-circumflex version is equivalent to the circumflex version. Does anyone have thoughts or ideas about how or why they should be treated equivalently?

I also recognize this can get kind of political. There was a push in California recently to let people have accented letters in their name. Apparently it is legally not allowed. And yet some people claim their California birth certificate does contain accented letters.

Postgres has a module called unaccent[0] that removes diacritics for filtering. I expect your browser is doing something similar. While not appropriate when looking for exact matches, when doing user-input based searches, this should probably be the norm, as the user may be unaware of the accents or how to input them correctly on their keyboards.

Dove deep on this years ago when implementing a filter for wines and wine regions.

[0][https://www.postgresql.org/docs/current/unaccent.html]

This is absolutely the desired default behaviour for ctrl+F in a browser. e.g. I frequently read French, and don't normally want to have to put in accents in my search term when I'm searching text for a word containing an accent.

Firefox has a "Match Diacritics" checkbox right next to the "Match Case" box when you ctrl+F so you can configure as desired.

> but at the same time it is sort of weird since it technically is not the same name without the circumflex, right?

Assuming you have a "standard" keyboard, it's not weird at all for your browser to match the diacritic when you type the non-diacritic character since presumably the diacritic would be difficult to type. Firefox's search feature even has a [_] Match Diacritics checkbox which you can enable or disable.

Related. Others?

Names:

Hello, I'm Mr. Null. My Name Makes Me Invisible to Computers (2015) - https://news.ycombinator.com/item?id=42922038 - Feb 2025 (35 comments)

We have an employee whose surname is Null (2014) - https://news.ycombinator.com/item?id=41939162 - Oct 2024 (6 comments)

We have an employee whose surname is Null (2010) - https://news.ycombinator.com/item?id=34115623 - Dec 2022 (17 comments)

How to pass “Null” (a real surname) to a SOAP web service? - https://news.ycombinator.com/item?id=21492461 - Nov 2019 (10 comments)

My last name makes me invisible to Computers (2015) - https://news.ycombinator.com/item?id=15046223 - Aug 2017 (135 comments)

Hello, I’m Mr. Null. My Name Makes Me Invisible to Computers - https://news.ycombinator.com/item?id=12426315 - Sept 2016 (208 comments)

If your name is 'Null,' you may have problems doing anything online - https://news.ycombinator.com/item?id=11375282 - March 2016 (1 comment)

Hello, I’m Mr. Null. My Name Makes Me Invisible to Computers - https://news.ycombinator.com/item?id=10512811 - Nov 2015 (24 comments)

An actual guy named “Null” messes up people's databases - https://news.ycombinator.com/item?id=9390569 - April 2015 (4 comments)

We have an employee whose last name is Null (2010) - https://news.ycombinator.com/item?id=6738743 - Nov 2013 (35 comments)

We have an employee whose last name is Null. He kills our employee lookup (2012) - https://news.ycombinator.com/item?id=6140631 - Aug 2013 (236 comments)

An employee, whose last name is Null, kills our employee lookup app - https://news.ycombinator.com/item?id=3900224 - April 2012 (148 comments)

---

License plates:

A 'Null' License Plate Landed One Hacker in Ticket Hell (2019) - https://news.ycombinator.com/item?id=31082288 - April 2022 (11 comments)

The 'NULL' License Plate (2019) - https://news.ycombinator.com/item?id=29609924 - Dec 2021 (6 comments)

Guy got the license plate “NULL” and it was a total disaster - https://news.ycombinator.com/item?id=23913507 - July 2020 (9 comments)

NULL license plate not such a bright idea - https://news.ycombinator.com/item?id=20676904 - Aug 2019 (467 comments)

---

Islands:

The Many Lives of Null Island - https://news.ycombinator.com/item?id=41073777 - July 2024 (21 comments)

Null Island Tourist Shirt -

This is hilarious:

  Even those without the last name Null are finding themselves caught in the void. Joseph Tartaro got a license plate with the word “NULL” on it nearly 10 years ago. The 36-year-old security auditor thought it would be funny to drive around with the symbol for an empty value. Maybe a police officer who tried to give him a ticket would end up writing null into the system and not be able to process it, he joked to himself.

  In 2018 he paid a $35 parking ticket. Soon afterward, he said, his mailbox was flooded with hundreds of traffic tickets for incidents he hadn’t been involved in. Tickets were from other counties and cities for vehicles of different colors, makes and models. A database had associated the word “null” with his personal information and citations were sent to Tartaro, who lives in Los Angeles.
> A database had associated the word “null” with his personal information and citations were sent to Tartaro, who lives in Los Angeles.

I'm not the biggest expert on databases, although I've worked with them a bit, but how does this occur in the first place? Usually, associations are done with primary/foreign keys. What database would allow null in that case?

It'd be sufficient if a system involved somewhere in the process converted null values to strings. There's innumerable ways, but here's a simple one in Java:

    final String myNullString = "" + null;
    System.out.println(myNullString);
If there are multiple systems involved, one of them produces a null and the other takes that as a key to create a record, but somewhere in between it gets stringified, then the string null might be accepted by a system using string keys.
And here we have identified that the system doing that uses PHP and its associative arrays.
They all do. But these are seperate databases that get translated to text at some point and then converted to Null

CREATE TABLE orders ( id INT PRIMARY KEY, customer_id INT NULL, FOREIGN KEY (customer_id) REFERENCES customers(id) );

vs

CREATE TABLE orders ( id INT PRIMARY KEY, customer_id INT NOT NULL, FOREIGN KEY (customer_id) REFERENCES customers(id) );

There are so SO many databases out in the wild that were built by people with little regard for building them correctly - or they simply not programmers/DBA's in the first place, but their boss told them to just make it happen.
This is genuinely terrifying to think about. All the ones that are really important are correct, right...? Like medical systems and financial systems and legal and..
Wait, you're telling me "NULL" is not equal to NULL?
no value is equal to NULL, including NULL
I actually wonder if many individual cops use "null" (the ordinary word) as a shorthand for "plate not applicable," "not identified", "missing" etc - semantically the same thing as NULL in programming, but then in this case it wouldn't be a database NULL error. In theory the same thing could happen if someone had a DEALER vanity plate. (Though that choice might be rejected for obliquely referencing drugs.)
(comment deleted)
The simple explanation is most of these are Excel VLOOKUPs gone wrong.
I'd guess that something somewhere has got its sanitization wrong. They tested it against

    Robert'); DROP TABLE Students;--
And see that it now provides

    'Robert DROP TABLE Students'
Problem solved! And then later somebody else comes along, ignorant of the sanitization step, and provides

    NULL
But the code strips special characters and adds quotes, so they've actually inserted:

    'NULL'
The real question is why anything in the STRING is getting interpreted at all. In databases ‘null’ is not the same thing as NULL.
IIRC the court told him the only way that he'd be able to stop getting other people's tickets in the mail would be to get a new plate. Otherwise he'd have to keep coming back to court to get them thrown out.
I wonder how many times you could come to court with bogus cases until they patch the software
I mean, this is the kind of petty I want to be when I retire...
definitely for eternity
I'm doubtful changing his plate would actually fix it. There's a decent chance that either his contact info would still be associated with null, or every record that currently has null would be updated to his new plate, which would probably make it even more of a pain to fight in court.
You would think that at a certain point he would never have to pay a personal traffic citation again since they would probably believe him that it wasn't him.
>his mailbox was flooded with hundreds of traffic tickets for incidents he hadn’t been involved in.

I had this problem a few years ago when I got a similar license plate — every time somebody wrote NOPLATE in the license field, I received their citation.

My state eventually "fixed" this by blocking all citations written NOPLATE... which means I don't even get legitimate [i.e. my vehicle illegally parked] fines anymore =P

Almost 30 years ago, the nutritionist Gary Null published books, had a show on Pacifica and so on. His basic message, I think, was that we should eat a diet that was less heavy on meats and processed foods. This is probably not wrong, but I thought him a bad influence on the household menus. I did object to his Pacifica show--he or somebody he had on mentioned "the Twinkie defense" not as a farce but as a plausible judgment; and he had some AIDS quack on, whose advice could only have been dangerous to the HIV-positive.
> His basic message, I think, was that we should eat a diet that was less heavy on meats and processed foods.

So that was the Null hypothesis?

It's rather fun that computers have these magic words in them.
Back then i was so amazed i could "destroy" MS-DOS just by typing CTTY CLOCK$. Or Window 98 just by executing /CON/CON
Are these the MSFT equivalent of `rm -R` [delete everything on your linux box]?
You would need to be root to delete (close to) everything, but I guess the most valuable stuff is typically in one's home folder anyway.
I had a relative named Null, who worked in tech in the 80s, 90s, and 00s. Apparently it caused him so many issues that he finally gave up and changed his name to the name of the town where our family came from.

I think he was a Java guy too. I’m sure that just made it worse.

Especially if he wanted kids, since I don’t think Java would’ve supported propagation.
>changed his name to the name of the town where our family came from.

Was he from DROP TABLE?

My last name is a popular Irish name with an apostrophe in it. I have tons of issues with my name in forms. I'm basically a walking SQL injection detector.

But also I've started to drop the apostrophe in most of my online profiles and things. So I think we're starting to see the end of apostrophes in people's names, thanks to some fun oddities of the internet and common database technologies.

Do you also get the apostrophe get mangled into something like `&#39;` ?
Reminds me of the story of the French politician with a forward slash in their name. https://en.wikipedia.org/wiki/Emeline_K%2FBidi?wprov=sfla1

I can't find a reference anywhere, but I remember reading that when their child was born they couldn't process a birth certificate with the name containing a slash, so it was changed to a dash for the kid.

Reading the article, I'd guess the introduction of the slash was introduced because the actual letter (Ꝃ) wasn't available on earlier technology like a typewriter. Funny that the "fix" caused problems with the next generation of tech.
> But also I've started to drop the apostrophe in most of my online profiles and things. So I think we're starting to see the end of apostrophes in people's names, thanks to some fun oddities of the internet and common database technologies.

This is a bugbear of mine! It's so frustrating that this is the easier path. Technology should make our lives better, not bend us to it's limitations!

No criticism on you of course, I'm as guilty.

Slightly related thought, but I have a popular Slovene name with letter Ž (pronounced as g in mirage) in it. Since I started living abroad, I use the letter Z, even when introducing myself. It often throws people off guard completely and it is much easier to use just Z.

So I guess some cultural aspect of names will also disappear, I know I want I children to have a bit more "international" names.

Suppose your name was "Néill" then you could just change it to b"N\xc3\xa9ill".
One place I worked, customers (usually merchants) sent product data through an API my team managed. I was working on a data validation project and ran across an item that was getting rejected. One of the fields customers can set is tags. The item was a t-shirt with a joke about null pointer exceptions, so someone set tags to include ["null", "pointer", "exception"]. Our parser coerced it to null, then returned an error because that array can't contain nulls.
Ah yes, automatic type coercion. A literal “WTF were you thinking” feature of JavaScript. So much pain for so little gain.
When it comes to implicit type conversion, JS has nothing on PHP.