Live data from Hacker News

ASCII and Unicode quotation marks

cl.cam.ac.uk

21–30 of 195 posts

Re: ASCII and Unicode quotation marks

#21
post #5
post #2

FYI For a long time GNU coding standards prescribed using the grave accent, but this changed some years ago now https://www.gnu.org/prep/standards/html_node/Quote-Character...

From the link: > Although GNU programs traditionally used 0x60 (‘`’) for opening and 0x27 (‘'’) for closing quotes, nowadays quotes ‘`like this'’ are typically rendered asymmetrically, so quoting ‘"like this"’ or ‘'like this'’ typically looks better. Is this link saying I can quit using `QUOTES' in my Emacs-documentation? That style always struck me as odd :)

Curved single quotes (‘...’) are recommended now:

https://www.gnu.org/software/emacs/manual/html_node/elisp/Do...

Re: ASCII and Unicode quotation marks

#22
post #16

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…

It is, and denotes opening and closing quotes.

I always hated this horribly inconsistency.

    \left( \right)
    \left{ \right}
    `` ''
Why not

    \left" \right"
    \left' \right'
Better yet, make it completely DRY:

    \( \)
    \{ \}
    \`` \''
    \` \'

Re: ASCII and Unicode quotation marks

#23
post #5
post #2

FYI For a long time GNU coding standards prescribed using the grave accent, but this changed some years ago now https://www.gnu.org/prep/standards/html_node/Quote-Character...

From the link: > Although GNU programs traditionally used 0x60 (‘`’) for opening and 0x27 (‘'’) for closing quotes, nowadays quotes ‘`like this'’ are typically rendered asymmetrically, so quoting ‘"like this"’ or ‘'like this'’ typically looks better. Is this link saying I can quit using `QUOTES' in my Emacs-documentation? That style always struck me as odd :)

[deleted]

Re: ASCII and Unicode quotation marks

#24

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…

Another giveaway of a TeX-savvy writer out of water is when you see --- for em-dash, i.e., ‘—’.

Re: ASCII and Unicode quotation marks

#25
post #7

It's very odd for me to see the grave accent (`) as quoting mark in bash and other programming languages. I understand that the accent alone lose its function for the human language. But still uncomfortable to se an accent as delimiter to a string.

Well, we also use the dollar sign to signify a variable in bash and PHP even though we aren't talking about an amount of USD. Likewise we use single and doublequote to mean special things.

HTML tags have nothing to do with less than or greater than, yet here we are.

In conclusion, it's simply convenient to use the standard keys we have and to use the symbols that are on it to mean something different from their original meaning in order to be able to express ourselves succinctly so that we don't have to spend so much time typing as we'd otherwise have to.

Of course you could always buy yourself an APL keyboard and write your programs in APL and use an APL REPL as your command line instead of using bash ;)

Re: ASCII and Unicode quotation marks

#26
post #24

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…

Another giveaway of a TeX-savvy writer out of water is when you see --- for em-dash, i.e. , ‘—’.

Does HN markdown understand — or ‘?

EDIT: Nope.

Re: ASCII and Unicode quotation marks

#27
post #17
post #10

It just occurred to me how much easier certain text-operations (like syntax highlighting, regular expressions and other parsers) if we consistently used the right unicode symbols for quotes and apostrophes

The only languages I know off the top of my head that use balanced delimiters for strings are M4 and Perl 6. Hey, imagine being able to nest strings without escaping! What a concept!

Not a language, but I adopted this concept as well: http://jstimpfle.de/projects/wsl/main.html

And I guess you could count HTML in, too.

Re: ASCII and Unicode quotation marks

#28
post #26
post #24

Earlier quoted context omitted.

Another giveaway of a TeX-savvy writer out of water is when you see --- for em-dash, i.e. , ‘—’.

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: -

Re: ASCII and Unicode quotation marks

#29
post #11

Earlier quoted context omitted.

I'm not even sure why ASCII has a grave accent. There are no combining marks so you could never write it over another letter. Edit: I forgot HTAB was actually part of ASCII. Oh well!

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.)

Re: ASCII and Unicode quotation marks

#30
to add to the confusion:

' PRIME (U+2032)

" DOUBLE PRIME aka inch mark (U+2033)

have their own codepoints

http://practicaltypography.com/foot-and-inch-marks.html

which describes implications for typesetting coordinates and other things:

118° 19′ 43.5″

118° 19’ 43.5” wrong (curly quotes, although it renders identical in some fonts)

118° 19' 43.5" right

Post reply on HN