Find Straight Quotes, Replace With Smart Quotes

Hi!

I have a 700 page LibreOffice Writer document that contains innumerable straight (’) quotation marks - along with autocorrected curly ones - that I would like to replace with single smart quotation marks.

I located a likely fix that involves:

  1. Checking the Regular Expressions option.
  2. Entering the strings '< or '. in the Find field, and
  3. Various strings in the Replace field (e.g. CTRL+0147, the ASCII number for a curly left quote).

Although this process finds each incidence of a straight quote, it does not replace same.

Any advice offered would be greatly appreciated.

Thanks.

P.S. I am using the latest version of Libre, on a Windows 7 laptop.

Can’t you just copy the required curly quote from text, and paste into the Replace field?

Btw, '. won’t work, because it would match any symbol after the quote, including space.

Mike,

Thanks for the reply.

I tried your suggestion. Unfortunately, it doesn’t work for me.

Please provide a test document with a part that doesn’t work, along with specific steps that fail.

Mike,

Thanks for persevering with me on this.

Here is a test document:

‘Lie down!’ I say.
The dog barks. ‘Woof-woof –!’

If I enter '< in the Find field, and check the Regular Expressions box, LibreOffice Writer finds every incidence of opening straight quotes.

However, nothing that I enter in the Replace field (e.g. cutting/pasting a curly quote, ASCII code, X code) changes these to opening curly quotes.

This works for me in “Find”: '(?=\w)

Somewhat related: “How do I convert straight quotes to typographic quotes?

decimal 147 and 148 is the Extended ASCII left and right extended quotation mark. LibO uses the Unicode international standard character set. This includes the US-ASCII, first 127 decimal characters and ISO-8859-1, first 255 characters. This does not include the extended ASCII characters. The Unicode punctuation marks are included in the GENERAL PUNCTUATION Unicode block at X’2018’ left single, right single (2019), left double(201C) and right double at X’201D’ .

I would follow the good advice provided by Mike and just copy across the characters.

On my system I can go to INSERT SPECIAL CHARACTER to insert the actual character into some text. Then COPY / PASTE that character into the FIND / REPLACE field.

Peter,

Thanks for the reply.

Mike’s suggestion doesn’t work for me.

Should it be possible for me to copy/paste X’2018 (etc) into the Replace Field?