Ideas for converting straight quotes to curly quotes

前端 未结 9 2173
星月不相逢
星月不相逢 2021-02-07 16:40

I have a file that contains \"straight\" (normal, ASCII) quotes, and I\'m trying to convert them to real quotation mark glyphs (“curly” quotes, U+2018 to U+201D). Since the tran

9条回答
  •  自闭症患者
    2021-02-07 17:02

    ["I like 'That '70s show'", she said]

    I originally thought maybe using multiple passes over the text to gain context insight might help but that would not solve all instances.

    The best thing you could do is run up a list of possible word sets/expressions like 'twas, 'tis, '70's etc. and throw them in the dictionary with auto-correction on them to convert the straights to curls and vice versa. Spell checks run on every word anyway don't they? (sorry that doesn't help your emacs problem)

    OO ignores the single quote curving all together from what I can tell.

    Wikipedia has a bit of info on these pesky things.

提交回复
热议问题