Live data from Hacker News

ASCII and Unicode quotation marks

cl.cam.ac.uk

71–80 of 195 posts

Re: ASCII and Unicode quotation marks

#71
post #53

Earlier quoted context omitted.

> You would still need an escape mechanism for something like... Yes, but that's a pretty rare case, much more so than embedded strings. Even that case could be solved by having two different quotes, like Python which allows both 'string' and "string". So you could do: «This is a string that mentions the ” character without escaping it» “This is a string that mentions the « character without escaping it” Yes, there a…

You don't want any 'rare' cases at all. That's the point. Stop using "punctuation" when you are attempting to "delimit" text. Use a character that is not punctuation, specifically designed for "field delimiter" purposes. Trying to do two things at once is ridiculous.

I've been trying to push TSV (tab separated values) as a standard response/implementation when they ask for CSV. "Yes but its comma separated!", sure is, but text can contain commas... I have seen issues with Google Spreadsheets not recognizing the tabs however... Excel doesnt know what to do with a TSV either. But both have a complete wizard for parsing CSV...

Re: ASCII and Unicode quotation marks

#72
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!

On a teletype, ALL characters are combining marks because you can backspace (another ASCII character derived directly from teletype codes) and type another character overtop it.

Are you old enough to remember when you printed your code on a teletype machine that blank spaces were represented by a "b" with a slash through it? I hated that.

Even worse, I remember one shop where the teletypes didn't have question marks, so people used capital P's instead.

Re: ASCII and Unicode quotation marks

#73
For reference, the BIOS text-mode font included with some IBM PCs (I've observed this on NetVistas and ThinkPads myself, at least) renders ` as a nice-looking opening quote, and ' looks like a nice closing quote.

Re: ASCII and Unicode quotation marks

#74
post #43
post #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

Those should be added to the document, with a note that they are NOT quotes!

I doubt this will ever be updated, since it's reference for a very specific, 20 year old, code interpretation related proposal und not meant for type setting.

But for anything related to contemporary typesetting on the web I recommend Practical Typography and especially the Type Composition chapter:

http://practicaltypography.com/type-composition.html#links

Including notes on quotes and apostrophes:

http://practicaltypography.com/straight-and-curly-quotes.htm...

http://practicaltypography.com/apostrophes.html

Re: ASCII and Unicode quotation marks

#75

Earlier quoted context omitted.

You don't want any 'rare' cases at all. That's the point. Stop using "punctuation" when you are attempting to "delimit" text. Use a character that is not punctuation, specifically designed for "field delimiter" purposes. Trying to do two things at once is ridiculous.

I've been trying to push TSV (tab separated values) as a standard response/implementation when they ask for CSV. "Yes but its comma separated!", sure is, but text can contain commas... I have seen issues with Google Spreadsheets not recognizing the tabs however... Excel doesnt know what to do with a TSV either. But both have a complete wizard for parsing CSV...

If it's for my own programs, I use pipe (|) separated values. They're visually appropriate and even less likely than tabs.

Re: ASCII and Unicode quotation marks

#76

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…

Yeah, I think the motivation for `' is for markup too. I'm pretty sure they've been recommended in GNU info and groff for that reason.

Re: ASCII and Unicode quotation marks

#77
post #41

The fact that ASCII does not have balanced quotes is one of the great catastrophes of computing. It makes everything more complicated than it needs to be, from embedding code in strings to parsing CSV files, to regexps. For example, if I want to embed a quoted string in another quoted string, I have to escape the inner quotes like so: "This is string containing an embedded \"quoted\" string" Then I have to think abou…

>All this horrible complexity could have been avoided if we could just write

Only if there was no chance of unbalanced quotes to need to be in the string.

Re: ASCII and Unicode quotation marks

#79

Earlier quoted context omitted.

You don't want any 'rare' cases at all. That's the point. Stop using "punctuation" when you are attempting to "delimit" text. Use a character that is not punctuation, specifically designed for "field delimiter" purposes. Trying to do two things at once is ridiculous.

I've been trying to push TSV (tab separated values) as a standard response/implementation when they ask for CSV. "Yes but its comma separated!", sure is, but text can contain commas... I have seen issues with Google Spreadsheets not recognizing the tabs however... Excel doesnt know what to do with a TSV either. But both have a complete wizard for parsing CSV...

There is actually an ASCII character that doesn't appear in strings, and is meant to be used as such a separator. Actually two of them, record (30) and unit separator (31).

Re: ASCII and Unicode quotation marks

#80
post #41

The fact that ASCII does not have balanced quotes is one of the great catastrophes of computing. It makes everything more complicated than it needs to be, from embedding code in strings to parsing CSV files, to regexps. For example, if I want to embed a quoted string in another quoted string, I have to escape the inner quotes like so: "This is string containing an embedded \"quoted\" string" Then I have to think abou…

[deleted]
Post reply on HN