News for hackers. Stuff that matters.
Re:What can’t the internet handle in 2022? Apostrophes by tapoxi on Tuesday October 04, 2022 @01:09AM (#33076869)
I have an Irish O' surname, and I've been to too many conferences where it's been changed to O%apos; on my nametag, and in once case a registration failed because there is a second unicode apostrophe that some text editors use which means my name won't match what's in their database. Not to mention many sites consider it an illegal character and drop the apostrophe all together.

It's infuriating, I've seriously considered changing my name because of it.

Re:What can’t the internet handle in 2022? Apostrophes by yongjik on Thursday October 06, 2022 @01:39AM (#33104753)
There's also a famous Dutch physicist, Gerard 't Hooft, whose family name is "'t Hooft", including the initial(!!) apostrophe. Imagine that.
Re:What can’t the internet handle in 2022? Apostrophes by johnorourke on Tuesday October 04, 2022 @01:57AM (#33077061)
Yep... post arrives to "O'Rourke", websites tell me "your name is invalid", checkouts tell me my details are incorrect so I can't pay. And not just small sites - I've seen it on banks, large retailers, companies who should know better.

Sometimes it's due to a legacy back-end system dating back to the 1990's or earlier, so they have to strip out "bad" characters before sending the order or contact form through.

Re:What can’t the internet handle in 2022? Apostrophes by mjevans on Tuesday October 04, 2022 @02:02AM (#33077076)
This wouldn't be nearly as much of an issue if the validation were consistent...

It's like those infuriating bank / other websites that truncate passwords on login forms but not on the password change form.

Re:What can’t the internet handle in 2022? Apostrophes by lovehashbrowns on Tuesday October 04, 2022 @10:05AM (#33080563)
My name has a dash “-“ due to the way my foreign birth certificate is written. I’m sure it’s not as annoying as an apostrophe, but goodness is it frustrating sometimes. For example, some hotels use lastname+room number for the wifi password. I never know if my last name has the dash or not. Sometimes it doesn’t work at all, so I’m not sure if the dash is being replaced by another character. Then there’s the problem of forms that don’t allow dashes in the last name field. Doesn’t sound like a problem until I’m filling out a form that’s meant to be legally binding in some way.
Re:What can’t the internet handle in 2022? Apostrophes by mellavora on Tuesday October 04, 2022 @03:44AM (#33077558)
aproppos "Hello, I'm Mr. Null. My Name Makes Me Invisible to Computers" https://www.wired.com/2015/11/null/

On the plus side, you have a strong privacy guarantee :)

Re:What can’t the internet handle in 2022? Apostrophes by belter on Tuesday October 04, 2022 @07:40AM (#33078988)
It could be also, like X Æ A-12, or any of the following real names of real persons:

Ben Dover, Hashtag Follow, Destinee Hooker, Khumalo Tiny Dick, Guy Nutter

Guilherme Crabogiale Fuck, Jurassic Park, Beautiful Existence, Tokyo Sexwale, Mike Litoris, Batman Bin Suparman, Jesus Condom

Mrs. Rape, Kash Register, Donald Duck, Robert Fagot, Tatiana Vagina, Hitler Mussolini.

Re:What can’t the internet handle in 2022? Apostrophes by wtetzner on Tuesday October 04, 2022 @10:58AM (#33081318)
That's so weird to me. It means that somewhere someone is matching the string "null" and converting it into an actual null value.
Re:What can’t the internet handle in 2022? Apostrophes by jsmith45 on Tuesday October 04, 2022 @01:16PM (#33083487)
What is generally happening in these cases is that data is getting stringified, with `null` becoming the string "null" (which is a common output for string formatting a null in various languages).

This output is is then later re-parsed, and to try to restore null inputs back to being null, the code matches on the string "null", ignoring the fact that that could have been a valid string itself.

Re:What can’t the internet handle in 2022? Apostrophes by remexre on Tuesday October 04, 2022 @11:15AM (#33081559)
It's pretty believable to me that _some_ Java deserialization library from the early oughts totally does this as a default behavior.
Re:What can’t the internet handle in 2022? Apostrophes by GoblinSlayer on Tuesday October 04, 2022 @02:33PM (#33084720)
Not all data structures are nullable or null reference is undesirable. In this case you can use the null object pattern https://en.wikipedia.org/wiki/Null_object_pattern#Descriptio...
Re:What can’t the internet handle in 2022? Apostrophes by DangitBobby on Tuesday October 04, 2022 @11:41AM (#33081970)
I suspect some batch processing job with a CSV dump is the culprit behind a lot of bad treatment of strings.
Re:What can’t the internet handle in 2022? Apostrophes by bloak on Tuesday October 04, 2022 @11:46AM (#33082075)
As I understand it, in the original Irish there's no apostophe and the apostrophe was added by English speakers because of a mistaken idea that it's short for "of the", as in "five o'clock". Of course, a lot of names are also spelt differently in Irish:

O'Rourke = Ó Ruairc

O'Reilly = Ó Raghallaigh

O'Donovan = Ó Donnabháin

So you could get rid of the apostrophe and at the same time really spice your name up, perhaps.

Re:What can’t the internet handle in 2022? Apostrophes by lamontcg on Tuesday October 04, 2022 @11:58AM (#33082273)
They'll get a middle initial of "O" probably due to that space character, and similar issues in matching their last name.
Re:What can’t the internet handle in 2022? Apostrophes by nebul on Tuesday October 04, 2022 @07:04AM (#33078709)
My first name contains an accented e, and what the computer will spit out is a crapshoot: é, e, é, é or just a plain blank square. It makes me want to buy an internationalised domain name out of spite.
Re:What can’t the internet handle in 2022? Apostrophes by jeroenhd on Tuesday October 04, 2022 @09:55AM (#33080425)
Internationalised domain names will display fine because they are punycode that browsers and other clients happen to render as internationalised domains.

E-mail is even worse than web applications at this because even common and popular mail clients can't do UTF-8 in email addresses right (https://www.google.com/search?q="SMTPUTF8"+site%3Adovecot.or...).

Re:What can’t the internet handle in 2022? Apostrophes by nebul on Tuesday October 04, 2022 @01:51PM (#33084052)
In my experience Punycode support in browsers varies greatly depending on the phishing[1] mitigations in place, making them quite unreliable in practice unfortunately.

I'm pleasantly surprised about SMTPUTF8 being a thing though. Yeah nobody uses it, but I thought email had zero UTF-8 support so it's at least better than nothing, I guess.

[1] https://en.wikipedia.org/wiki/IDN_homograph_attack#Homograph...

Re:What can’t the internet handle in 2022? Apostrophes by GoblinSlayer on Tuesday October 04, 2022 @02:39PM (#33084782)
SMTPUTF8 is about unicode email addresses. I think, UTF-8 messages have wide support.
Re:What can’t the internet handle in 2022? Apostrophes by nebul on Tuesday October 04, 2022 @03:08PM (#33085215)
Sorry, I was indeed talking about Unicode email addresses but I worded it poorly. Thanks for the precision!
Re:What can’t the internet handle in 2022? Apostrophes by raverbashing on Tuesday October 04, 2022 @08:27AM (#33079320)
It's frankly infuriating how names with apostrophes were considered "invalid" even in systems designed for the US population (including a great number of Irish immigrants - ah but blame them for having "funny names" - that are even full ASCII)
Re:What can’t the internet handle in 2022? Apostrophes by sacrosancty on Tuesday October 04, 2022 @01:51AM (#33077040)
Imagine if even strongly typed languages had different string types for various encodings like that and enforced them. Then such bugs would be as rare as, say, a date appearing as a huge integer.
Re:What can’t the internet handle in 2022? Apostrophes by Cu3PO42 on Tuesday October 04, 2022 @04:11AM (#33077688)
To a degree, Rust does this. The standard string type is always guaranteed to be valid UTF-8. Then there's a string type for the OS native format and a string type for what constitutes a valid path on the file system. Of course, arrays of bytes also exist and so does a type for a null-terminated "CString". Converting between them requires runtime checks (unless you invoke unsafe code and promise you know better than the compiler).

It's cumbersome at times, but a perfectly reasonable tradeoff in my opinion. Some libraries add other string types when they're needed to interact with a system. For example, the windows crate has wide strings.

Re:What can’t the internet handle in 2022? Apostrophes by mejutoco on Tuesday October 04, 2022 @10:56AM (#33081292)
This is a good idea I believe. While I agree it would be convenient to have it in the standard library of more languages, it can be implemented in strongly typed languages, using something like Newtype in haskell. In Typescript, for example, it could be:

  type SanitizedString = string
And somewhere you have a function getSanitizedString and if you don't call that the type system will complain.

Same could be done to represent a distance in Km or miles:

  type DistanceKm = number
  type DistanceMiles = number
And then functions can explicitly use any of them or only some (we could define some function multiplying them to allow 2 arguments only if they are the same type).
Re:What can’t the internet handle in 2022? Apostrophes by rhn_mk1 on Tuesday October 04, 2022 @02:59AM (#33077342)
When Python did that to separate raw bytes and proper Unicode, people pointed this out as a reason they don't want to use the language any more.
Re:What can’t the internet handle in 2022? Apostrophes by sacrosancty on Tuesday October 04, 2022 @07:37PM (#33088721)
Sounds like Python wasn't right for those people in the first place. Abstracting away the internal data format is typical of Python.
Re:What can’t the internet handle in 2022? Apostrophes by Thorrez on Tuesday October 04, 2022 @03:39AM (#33077518)
Re:What can’t the internet handle in 2022? Apostrophes by notacoward on Tuesday October 04, 2022 @09:15AM (#33079877)
There was a research C compiler, maybe related to the meta-compilation effort that became Coverity, that did something like this. It let you attach arbitrary attributes to a variable and then enforce invariants regarding those attributes. The one that caught my eye was tagging checked vs. unchecked user input, so that using such input before checking (or sanitizing) would become a type error. It's a shame that the idea didn't catch on more.