Convert to ZWNJ

Hello.

How can I convert Non-breaking space character to Zero-width non-joiner character with Find & Replace

tdf#106137

1 Like

The simplest solution is to enter a U+200C ZERO WIDTH NON-JOINER in your document and copy it in the clipboard. Open the F&R dialog and paste this ZWNJ into the Replace: entry box. The U+00A0 NO-BREAK SPACE is easier because OS keyboard drivers usually allow to generate one with modifier combinations, e.g. Ctrl+Shift+Space under Linux (you didn’t mention your OS). Untick Regular expressions since NBSP was entered literally.

Remove the extra ZWNJ after replacements.

PS: when asking here, always mention OS name, LO version and save format.

2 Likes

Note that in Find box, the regex syntax allows to input Unicode codepoints as \u00A0. That would indeed require ticking Regular expression checkbox :slight_smile:

Yes, I use the feature for less common codepoints.