News for hackers. Stuff that matters.
Re:My last name makes me invisible to Computers (2015) by tyingq on Friday August 18, 2017 @10:36AM (#15046532)
I have seen apps that choke on much more common names. Like O'Brian.

This post is a classic on various name issues: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...

Re:My last name makes me invisible to Computers (2015) by Freak_NL on Friday August 18, 2017 @11:19AM (#15046950)
Tangentially related (rule 9); my girlfriend's surname contains an 'é'. I have yet to see a year go by without receiving mail having 'é' on the address label where the é should be.

Explanation:

    echo "é" | iconv -t utf8 -f iso8859-15
We're Dutch, and the é is part of our language, and even part of the legacy character encoding standard everyone used before Unicode's widespread adoption. This is just a matter of code that works perfect as long as all characters are part of the ASCII set, but fails on the characters that don't conveniently match between UTF-8 and ISO-8859-15.

I doubt these issues will go away within even, say, twenty years.

Re:My last name makes me invisible to Computers (2015) by Animats on Friday August 18, 2017 @06:00PM (#15050096)
It's getting much better. Almost everything new is in UTF-8.

I've been writing code to clean up a 2013 database dump. The database stored everything in LATIN-1 fields. Not because the data is in LATIN-1, but because LATIN-1 will accept any byte value. This makes error messages during input go away. See this bad advice on Stack Overflow.[1]

Some of the data is ASCII. Some is UTF-8. Some is Windows-1252. Some data is none of those, but is mostly ASCII except that there's a 0x9d once in a while. (Still haven't figured out what character set that is. From context, the ™ or ® symbol is intended.) So I have recognizers for these cases, and convert everything to UTF-8, testing every field value individually.

One column has garbaged non-English names. Someone had tried to "normalize" UTF-8 to lower case by using an ASCII lowercasing function on UTF-8 stored in a LATIN-1 field:

    KACMAZLAR MEKANİK  -> kacmazlar mekanä°k
    Anita Calçados -> anita calã§ados
    Felfria Resor för att Koh Lanta -> felfria resor fã¶r att koh lanta
I have the un-"normalized" form and can fix this.

[1] https://stackoverflow.com/questions/44251813/unicodedecodeer...

Re:My last name makes me invisible to Computers (2015) by ygra on Saturday August 19, 2017 @04:37AM (#15052371)
Even if something new is UTF-8, you'd basically have to guarantee that it never interfaces with anything old and/or broken to ensure the data survives intact. I've recently received a package where the ö in my name was written as ̦ which I've never seen before. Things go wrong in the most unexpected places and the sad thing is that even if you use UTF-8 for text storage, you still have to know what you can do and how to do it to not mangle it.

There are a lot of Unicode-hostile environments out there. Java is old enough to always require explicit encoding declaration for pretty much any tool ... compiler, documentation generator, etc. Forget it at any one point and you get garbage. Reading or writing text files should always make the encoding explicit, but rarely does so. C#'s string methods all support, but don't require, a Culture parameter, without which you're practically guaranteed to do things like case conversion, or substring searches wrong in the general case. There was an awesome and long answer by tchrist on SO once about what the Perl boilerplate is to properly support Unicode for many or most circumstances (it's complicated and long and I doubt many people are going those lengths).

Point being, even when using something that supports Unicode well, the programmer still has to care, simply because text and language are messy things and it simply isn't possible to have a magic bullet that does everything right.

Re:My last name makes me invisible to Computers (2015) by kijin on Friday August 18, 2017 @11:43AM (#15047171)
Dutch programmers probably have little incentive to get it right, because Dutch makes relatively light use of accents. I wouldn't be surprised if Czech programmers, for example, were much more meticulous at converting between UTF-8 and legacy encodings.

Here in CJK territory, using the wrong encoding makes the output so obviously broken [1] that mistakes are almost always caught before hitting production.

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

Re:My last name makes me invisible to Computers (2015) by sebtoast on Friday August 18, 2017 @12:08PM (#15047405)
I'm French and I see this all the time, even Outlook, given the right conditions, will gives you this in the default folders, Inbox in French is "Boite de réception".
Re:My last name makes me invisible to Computers (2015) by lokedhs on Friday August 18, 2017 @11:09PM (#15051446)
Don't get me started on Outlook folders. The actual names are of the folders are localised, not just the way it's presented to the user. The folders are created when you first start Outlook (and not when your account is created).

If you happen to be using Windows configured in a foreign language the first time you start Outlook, your inbox, sent mail, etc, folders are named according to that language, and will never change, and you'll have to live with non-standard names for the folders.

At least its teaches you how to configure folders manually in most email clients.

Re:My last name makes me invisible to Computers (2015) by jnky on Saturday August 19, 2017 @12:11AM (#15051623)
You can change the folder names after the fact. It is annoying, though.

https://support.microsoft.com/en-us/help/2826855

Re:My last name makes me invisible to Computers (2015) by tajen on Saturday August 19, 2017 @04:57AM (#15052420)
That's why I take care that my OS doesn't know I'm French. But it's a luxury that most French people can't afford and they have to live with bugs. Ex: Having both a "Download" and a "Téléchargement" folder, with "Download" being sometimes translated.
Re:My last name makes me invisible to Computers (2015) by lokedhs on Sunday August 20, 2017 @05:12AM (#15057622)
This is something Apple got right. The underlying folder has a standard name, and the translated name is just a different presentation. If you change language, the names of the translated folders change.

For anyone who doesn't know OSX, this translation happens on the UI level. Typing ls in a terminal gives you the real directory name.

Re:My last name makes me invisible to Computers (2015) by xenadu02 on Saturday August 19, 2017 @03:16AM (#15052137)
> I doubt these issues will go away within even, say, twenty years.

Much like the printing press, I'm 100% certain that the computing (and the internet specifically) is altering human written language across the world.

It is just so much easier to avoid anything outside ASCII because you can be certain ASCII will always work - even though some awful MS Access -> CSV -> SQL -> SQL -> Excel -> SQL -> COBOL ETL pipeline. No matter what version of any software is being used.

Technology has always shaped written language and we should fight to do better but at this point it seems inevitable.

(To be clear: I'm not saying this is a good or desirable state of affairs)

Re:My last name makes me invisible to Computers (2015) by kpil on Saturday August 19, 2017 @10:26AM (#15053528)
I really doubt that there is any transliteration into ASCI that's acceptable to European speakers.

Eg A Ą Å Æ Ä are all different letters in most languages, not simply a pronunciation guide. I think most European languages use at least two from that list.

Re:My last name makes me invisible to Computers (2015) by tajen on Saturday August 19, 2017 @04:53AM (#15052410)
I wonder what happens if you book an airline ticket as "Miche" instead of "Miché". Will custom/CIA choke on the unmatching name?
Re:My last name makes me invisible to Computers (2015) by nteou987noeu on Friday August 18, 2017 @12:14PM (#15047473)
I feel your pain. My wife has a French first name with an acute accent over the "e" as well. Many forms will outright reject the accent, so I've taken to just not typing it most of the time. Being American, it doesn't really bother her, though. I know in some languages missing accents and other similar markings changes the pronunciation and meaning of words and can be very irritating to some.
Re:My last name makes me invisible to Computers (2015) by prance on Saturday August 19, 2017 @04:24PM (#15055384)
> accents and other similar markings changes the pronunciation and meaning of words

Yes. In some languages those are actually not "markings" but denote proper letters, like in German ä,ö,ü and ß. But even if not, like in French, it can alter the meaning of words. E.g la != là. Therefore, for most Europeans and speakers of other languages that depend on more letters than ASCII provides, it is very annoying when that is not supported properly.

However, I have made the experience in a few cases that particularly Americans have a hard time understanding this. The remark about your wife not caring seems to be in this vein, too. Recently, I decided to convert our MySQL DB tables from latin1 to UTF8. (I wasn't even aware that we didn't have some form unicode, as our DB is only few years old, and I thought some unicode is the default nowadays everywhere. But then MySQL...)

Anyway, my CEO (also an American incidentally) was trying to keep me from it because he thought it's not high priority. However, we're about to go live in a French-speaking region, but which also has other indigenous languages (and therefore names), with their own "special" characters (I put "special" in quotes because for those languages, they're not "special" at all -- but I guess you get my gist by now).

Also, in previous jobs I have converted legacy systems to unicode and know what a pain it is down the road. Not to mention all the hard-to-find bugs if you don't do it, because some strings don't compare as they should, or people are just annoyed because their name is not shown correctly.

So I went ahead with the conversion anyway. We may never know for sure, but I'm convinced that I saved us some major customer frustrations, days of bug hunting and weeks of converting everything later, when existing data would need to be migrated.

So please everyone, just use UTF8 or some other unicode variant from the get-go. The few bits you might save otherwise are just not worth it.

Re:My last name makes me invisible to Computers (2015) by charlieo88 on Friday August 18, 2017 @11:03AM (#15046798)
It's not always a computer problem. I have an O' name. There have been many college educated adults I've had to explain the difference between a quote ("), an apostrophe ('), and whatever the hell you call the character under the tilde (`). I kid, it's the grave.
Re:My last name makes me invisible to Computers (2015) by pjungwir on Friday August 18, 2017 @04:29PM (#15049478)
If you really want some fun, try explaining to people the difference between modern Greek tonos (e.g. ή, Unicode 03ae) and ancient Greek oxia (e.g. ή, Unicode 1f75). Or in UTF-8:

    paul@tal:~$ od --format=x1z tmp/tonos-oxia
    0000000 74 6f 6e 6f 73 3a 20 ce ae 0a 6f 78 69 61 3a 20  >tonos: ...oxia: <
    0000020 20 e1 bd b5 0a                                   > ....<
It's super fun when you are the only tech person in a Classics grad program and everyone else is turning in papers that look like ransom notes, because every fourth vowel has a different x-height from all the other letters. :-)

Here are the two Unicode ranges (PDF):

modern Greek: http://unicode.org/charts/PDF/U0370.pdf

ancient Greek: http://unicode.org/charts/PDF/U1F00.pdf

Then again, try explaining to tech people the difference between ή and ἠ and how you can get ἤ or ᾔ. :-)

Re:My last name makes me invisible to Computers (2015) by Grustaf on Saturday August 19, 2017 @04:36AM (#15052366)
You're not saying the classicists confuse the smooth breathing with the acute accent, right? Only they can't figure out how to typeset them?

How do you enter them nowadays by the way? In the early days of the internet before unicode there were special fonts from SIL for example that first of all were using Latin characters (you'd type W and it would look like Ω) and secondly I think had the diacritics as separate characters, so the font would combine them. It was messy but at least you could type it on a normal keyboard. You could even read it in its ASCII form, most of the hacks were pretty reasonable.

Re:My last name makes me invisible to Computers (2015) by pjungwir on Monday August 21, 2017 @11:01PM (#15069402)
Not smooth breathing and acute, but Unicode has two codepoints for acute accents (sort of). One is the modern Greek tonos, which often looks just like an acute accent but sometimes appears as a dot or straight vertical line, and the other codepoint is the ancient Greek oxia (the ancient term for the acute accent), which appears with all the other marks and their combinations (grave, circumflex, smooth/rough breathing, iota subscript).

Personally I type Greek using a vim keymap file, usually when writing LaTeX. I believe my keymap file is influenced by those older non-Unicode fonts, because I type w for ω and ;h for ή and >~h| for ᾖ. But my fellow students would mostly use Word. I don't know how they would type the letters, but commonly they would mix the tonos letters with everything else. I think what was happening is that Word would automatically substitute fonts that offered those codepoints, so it would end up showing Times for the letters with tonos and Palatino for the others (or something like that). Hence the ransom note effect.

Re:My last name makes me invisible to Computers (2015) by memco on Saturday August 19, 2017 @01:21AM (#15051826)
My kingdom for a good monospaced font and supporting editor to handle these and RTL languages. I've found Setups that work with one or the other, but none seems to do it all just yet.
Re:My last name makes me invisible to Computers (2015) by eadmund on Saturday August 19, 2017 @10:35AM (#15053582)
The combination of Adobe Source Code Pro & emacs works well for me.
Re:My last name makes me invisible to Computers (2015) by halfdgvfyjjuc on Friday August 18, 2017 @11:22AM (#15046978)
That character is a backtick not a grave isn't it? Also some cultures use «» as quotes. It's a big world.
Re:My last name makes me invisible to Computers (2015) by dsp1234 on Friday August 18, 2017 @12:07PM (#15047392)
https://en.wikipedia.org/wiki/Grave_accent

"Programmers use the grave accent symbol as a separate character (i.e., not combined with any letter) for a number of tasks. In this role, it is known as a backquote or backtick."

Re:My last name makes me invisible to Computers (2015) by mark-r on Friday August 18, 2017 @06:59PM (#15050404)
ASCII never really supported the idea of a combining character, so it's not surprising that the original intent was subverted.
Re:My last name makes me invisible to Computers (2015) by kgwgk on Saturday August 19, 2017 @05:13AM (#15052475)
ASCII supported combining characters. That’s what backspace was for!

https://news.ycombinator.com/item?id=11654682

Re:My last name makes me invisible to Computers (2015) by mark-r on Saturday August 19, 2017 @10:38AM (#15053611)
That was very illuminating, thanks. Interesting that the idea was there originally but was later deprecated when they realized video terminals couldn't do it. Today it would be trivial to convert the sequence letter/backspace/accent to its UTF-8 equivalent.
Re:My last name makes me invisible to Computers (2015) by ygra on Saturday August 19, 2017 @04:42AM (#15052382)
Heck, in some fonts ` even takes the form of ‛ or ‘. Which is probably where typing quotes like ``this'' comes from (which looks absolutely awful nowadays since it mixes an uncombined diacritic with a kludge of a punctuation character).
Re:My last name makes me invisible to Computers (2015) by 0xffff2 on Friday August 18, 2017 @11:29AM (#15047046)
Is there a difference? I think those are both words for the same character.
Re:My last name makes me invisible to Computers (2015) by pc86 on Friday August 18, 2017 @01:02PM (#15047866)
It's a backtick when by itself, grave when it's an accent over another character.
Re:My last name makes me invisible to Computers (2015) by bmm6o on Friday August 18, 2017 @11:19AM (#15046958)
For an extra challenge, you can explain what an 'okina is.
Re:My last name makes me invisible to Computers (2015) by kijin on Friday August 18, 2017 @11:19AM (#15046957)
The backtick and apostrophe are often used to emulate ``curly quotes,'' which makes the confusion even worse.
Re:My last name makes me invisible to Computers (2015) by jamescostian on Friday August 18, 2017 @11:30AM (#15047047)
I think this style might come from TeX, based on this comment: https://english.stackexchange.com/questions/17695/any-refere...

Manpages aren't written in TeX though (apparently they use something called "roff"), but they also contain things like `read' instead of 'read'... perhaps manpage writers tended to like TeX too?

Re:My last name makes me invisible to Computers (2015) by gpvos on Friday August 18, 2017 @06:16PM (#15050185)
Probably the other way round: roff/troff/nroff is older than TeX. I guess that on old computer typesetters, ` and ' turned into nicely balanced quotes.
Re:My last name makes me invisible to Computers (2015) by tankenmate on Saturday August 19, 2017 @12:20PM (#15054169)
roff was the financial back reason that Unix moved from PDP-7 / assembler to PDP-11 / C.

http://www.read.seas.harvard.edu/~kohler/class/aosref/ritchi...

Re:My last name makes me invisible to Computers (2015) by teddyh on Saturday August 19, 2017 @10:27AM (#15053536)
In old fonts, ` often displayed as ‘ and ' displayed as ’. When they wrote ``foo'', that was meant to show up as ‘‘foo’’, which was a workaround for not having characters to properly spell “foo”.
Re:My last name makes me invisible to Computers (2015) by l0b0 on Saturday August 19, 2017 @03:43AM (#15052210)
Even more annoying is when you realise that those quotes are a hack because keyboards don't have separate left and right single and double quotation marks. The rabbit hole goes deeper…
Re:My last name makes me invisible to Computers (2015) by justinv on Friday August 18, 2017 @11:05AM (#15046813)
Hyphens too.

Source: have a hyphenated last name. "No special characters in this field".

Re:My last name makes me invisible to Computers (2015) by tyingq on Friday August 18, 2017 @11:16AM (#15046918)
I'll bet it was an airline. The underlying field type for names in a PNR in the TPF os only allows A-Z and space.
Re:My last name makes me invisible to Computers (2015) by nteou987noeu on Friday August 18, 2017 @12:18PM (#15047505)
I get that with periods in a street name. Like when I write "123 Main St.", and the web site checks against the USPS's database, it will either reject it outright for having "special" characters, or will say, "We didn't find that, but we found this similar address - '123 Main St', which should we use?" It's so fucking dumb.
Re:My last name makes me invisible to Computers (2015) by kalleboo on Saturday August 19, 2017 @12:46AM (#15051730)
I had a fun issue signing up for a bank here in Japan.

Japanese people can't have middle names (the citizen registry doesn't allow it), but foreigners can, so many systems will reject spaces in the name field. Meanwhile they're meticulous about making sure your name matches your ID exactly, leading to the situation I had.

The bank's web signup form disallowed spaces in your name, so I wrote my name FIRSTMIDDLE. Then when they processed my application they sent me an email "Your name doesn't match your ID card! Please approve the change to 'FIRST MIDDLE'."

Re:My last name makes me invisible to Computers (2015) by tyingq on Friday August 18, 2017 @12:35PM (#15047658)
I sympathize, but it is a hard problem to solve. On the seller side, many orders come in with addresses that are just wrong, or missing suite numbers, business names, etc.

Ups and FedEx charge shippers ~$15 for each instance where they have to address correct.

So, yeah, the period thing is dumb, but automated correction is hard. Even experts, like SmartyStreets get it wrong often.

Re:My last name makes me invisible to Computers (2015) by rev_null on Friday August 18, 2017 @10:52AM (#15046690)
There was a notable incident where Facebook rejected Caterina Fake.
Re:My last name makes me invisible to Computers (2015) by craigds on Friday August 18, 2017 @11:22AM (#15046975)
Dutch names (two or three word surnames with spaces) confuse all sorts of systems/people.
Re:My last name makes me invisible to Computers (2015) by sobani on Monday August 21, 2017 @10:51AM (#15065010)
Dutch first names confuse systems as well. Gmail doesn't understand the first name of my colleague is "Jan Willem" and not just "Jan", when showing the list of recipients.
Re:My last name makes me invisible to Computers (2015) by b3lvedere on Friday August 18, 2017 @07:12PM (#15050474)
Many years ago computer systems analyzed my last name, which are two seperate words, as me being married. I got quite some snail mail calling me Mrs. [2nd part of last name] for some weird reason.
Re:My last name makes me invisible to Computers (2015) by timcederman on Friday August 18, 2017 @06:14PM (#15050176)
Astonishingly, nest.com does not work for me at all if I use the hyphen in my last name.
Re:My last name makes me invisible to Computers (2015) by copperx on Sunday August 20, 2017 @10:52PM (#15061591)
Last names can start with a lowercase too, like d'Auriol.