Live data from Hacker News

ASCII and Unicode quotation marks

cl.cam.ac.uk

31–40 of 195 posts

Re: ASCII and Unicode quotation marks

#31
post #28
post #26

Earlier quoted context omitted.

Does HN markdown understand — or ‘? EDIT: Nope.

It doesn't need to. You can put the mdash directly in comments: — As opposed to regular dash: -

Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.

Re: ASCII and Unicode quotation marks

#32

> Please do not use the ASCII grave accent (0x60) as a left quotation mark together with the ASCII apostrophe (0x27) as the corresponding right quotation mark (as in `quote'). Tell that to GCC: /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' Looks good to me, by the way. > Where ``quoting like this'' comes from I did it for a while out…

> then you should still stick to ASCII unless you have other good reasons to. Why? Using non-ASCII Unicode characters acts like a nice canary for detecting character encoding issues. Besides, why would I purposely limit my text to ASCII? It doesn't even suffice for English, let alone almost any other language I use ­— including my native language Dutch, German, and Japanese.

All sorts of reasons. Diagnostic printf message in some embedded firmware. Do you need to drag Unicode into it? Git log message. Ditto.

Re: ASCII and Unicode quotation marks

#33
post #29

Earlier quoted context omitted.

In ASCII instead of combining marks what you have to do is write three characters: * The unaccented letter * The backspace character * The accent character If this makes no sense to you, try to imagine a literal, physical typewriter. Windows line terminators also work with a similar principle.

From what I recall from my childhood, physical typewriters worked slightly differently: the accent keys were non-advancing ("dead") keys. You pressed the "acute" key followed by the "e" key for an é, for instance. If you wanted a bare accent, you pressed the accent key followed by the space bar. (The typewriters I recall also didn't have a 0 or 1 key, you used uppercase O or I for these numbers.)

Yes. I consider it a mistake of Unicode that combining characters follow rather than precede the base character. If they preceded, most dead keys could simply generate the appropriate combining character, rather than requiring complicated input method support. (And finding the end of a sequence of multiple combining character wouldn't require lookahead.)

Re: ASCII and Unicode quotation marks

#34
post #28

Earlier quoted context omitted.

It doesn't need to. You can put the mdash directly in comments: — As opposed to regular dash: -

Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.

At least on the US keyboard, Mac OS lets you input all three dash types.

Hitting the button to the right of [0] outputs a hyphen ("-"). Holding alt/option when hitting it will output an en dash ("–"), holding both alt/option and shift will output an em dash ("—").

- = -

⌥- = –

⇧⌥- = —

Re: ASCII and Unicode quotation marks

#35

I'm pretty sure text like: ``quoted'' Is how you're supposed to write short quotes in the TeX/LaTeX typesetting system. [edit: My point being that the author seems to think this type of quoting originated with X11... which is actually newer than TeX (X11 was first released in 1984), and that the prevalence of this type of quoting likely originated with TeX when it was released in 1978... which isn't mentioned at all…

Interesting historical note. Of course that's TeX input, and the author using it knows that it will be interpreted in TeX's special way and the correct characters used in the typeset output. Also, with the current Unicode-aware TeX engines, you can just input the normal Unicode quotation marks. That makes your source easier to read.

Re: ASCII and Unicode quotation marks

#36
It's worse for other languages. Russian quotation marks are « and ». Thanks to early computers being predominantly from/designed in the US, they are now highjacked by American quotes.

Same probably goes for French and other languages with their own sets of quotation marks.

Re: ASCII and Unicode quotation marks

#37
post #28

Earlier quoted context omitted.

It doesn't need to. You can put the mdash directly in comments: — As opposed to regular dash: -

Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.

Nobody's keyboard had an em-dash key (well, maybe some compositor keyboards...). It's well worth the time to figure out how to enter at least the most useful Unicode characters. See, here's an em-dash: —.

Re: ASCII and Unicode quotation marks

#38
I find it interesting that the article includes a German keyboard that doesn't include the proper ,,'' (or ,') quotation glyphs. However it does include grave and acute accents as well as French primary quotations (>) though not the secondary guillemots (quotation characters ) none of which are used in German text.

And of course I used ascii analogues to type these into HN :-(

Re: ASCII and Unicode quotation marks

#39
post #28

Earlier quoted context omitted.

It doesn't need to. You can put the mdash directly in comments: — As opposed to regular dash: -

Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.

If I need a special character, I find a web page or document that has it and use copy/paste.
Post reply on HN