Live data from Hacker News

ASCII and Unicode quotation marks

cl.cam.ac.uk

191–195 of 195 posts

Re: ASCII and Unicode quotation marks

#191
post #58

Earlier quoted context omitted.

You don’t need escaping in «This is a string containing an «embedded» quoted string».

«Hi. How do I open a quote?» «Oh, you just use the « character.» Parse error. Unexpected EOF.

That wouldn’t be a good idea but you could adapt your parser to support that case. You can write `/* /* */` in C, for instance.

To clarify: we’d still need escaping but in fewer cases.

Re: ASCII and Unicode quotation marks

#192
post #85
post #58

Earlier quoted context omitted.

You don’t need escaping in «This is a string containing an «embedded» quoted string».

So, how would you encode this in a string: To end a string, use the » character. ?

You escape it. What I was saying was nested strings wouldn’t need escaping.

Re: ASCII and Unicode quotation marks

#193

MS PGothic, a very common font in Japan, still uses this type of quote. "Quoting like this'' (double quote, then two single quotes) looks the most natural in this font. "Using two double quotes" looks quite odd (see screenshot) [1] If you've ever seen an English-language page on a Japanese website that used weird quotes, this is probably why. [1] https://i.imgur.com/zcuFZa1.png

So I just saw parentheses like this "()" on japanese twitter

it starts with a regular parenthesis "(" but ends with a fullwidth parenthesis ")"(U+FF09)

is this a similar thing?

Re: ASCII and Unicode quotation marks

#194
post #182

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

> It looks like shit in any font in which the apostrophe is a little nine, which is historically correct. What you want is a little "six" on one side and a "nine" on the other, or at least some approximation thereof. Even if the apostrophe is crappily rendered as a little vertical notch, it still pairs with a backwards-slanted `. > (The representation of apostrophe as a little vertical notch, I suspect, caters to lit…

Open any random book in the English language printed in the last 200 years.

All the apostrophes look like a little nine: in contractions like it's, and the possessive 's.

That's the character that was included in the American Standard Code for Information Interchange.

Image: http://www.worldpowersystems.com/J/codes/X3.4-1963/page5.JPG

The glyph appearing in the standard looks like a little 9. It is denoted as "APOS" in parentheses. A reference to it is made in A6.8, calling it "apostrophe".

Wikipedia's (https://en.wikipedia.org/wiki/Apostrophe) page refers to a vertical notch glyph as a "typewriter apostrophe". The normal non-typewriter apostrophe looks like a comma.

Okina? That indicates a glottal stop in some languages none of which are English, and so which were understandably not represented in the American Standard Code.

Re: ASCII and Unicode quotation marks

#195
post #182

Earlier quoted context omitted.

> It looks like shit in any font in which the apostrophe is a little nine, which is historically correct. What you want is a little "six" on one side and a "nine" on the other, or at least some approximation thereof. Even if the apostrophe is crappily rendered as a little vertical notch, it still pairs with a backwards-slanted `. > (The representation of apostrophe as a little vertical notch, I suspect, caters to lit…

Open any random book in the English language printed in the last 200 years. All the apostrophes look like a little nine: in contractions like it's , and the possessive 's. That's the character that was included in the American Standard Code for Information Interchange. Image: http://www.worldpowersystems.com/J/codes/X3.4-1963/page5.JPG The glyph appearing in the standard looks like a little 9. It is denoted as "APOS"…

> That's the character that was included in the American Standard Code for Information Interchange.

Yes, and that's the character that was immediately overloaded to used to mean a whole bunch of other things, because ASCII only included 95 printable characters, and did not include a prime symbol, an 'okina, or a left single quotation mark.

For that reason, U+0027 is not an apostrophe anymore. As the only ASCII character that can be used for a long list of uses, it's been massively overloaded, which is why Unicode currently defines U+0027 as a typewriter apostrophe and U+2019 as a real apostrophe.

Post reply on HN