Find non-breakable space

Hi.
I’m using LibreOffice 7.0.5.2 x64 and I just detected I can’t find non-breakable spaces using the “basic” approach of copying the non-breaking space and pasting on the search dialog.

Instead, I have to activate regular expression search and look for \x0A.

Well, I have some experience with regular expressions and I can manage it. Just I think having to look up the code for non-break in the unicode reference every time you need to search a nonbreak space is a bit time consuming.

Did this behaviour change on modern versions? I’m stuck to 7.0 since I use a cloud site which is stuck to collabora, which seems stuck to openoffice 4.x/5.x, so I don’t want to get too modern.

Yours,
José

You probably can’t add an extension then. The extension Alternative Find and Replace for Writer (AltSearch) allows searching for a pasted non-breaking space.

I wouldn’t say that that 7.0.5.2 is not modern, it was released in March 2021.

1 Like

Oh.
Collabora Online was never based on “openoffice” - it is based on LibreOffice; and Apache OpenOffice (the only current project with “openoffice” in the name) had no “5” release yet (it struggles to release 4.2).

Current Collabora Online version (21.11) uses Collabora Office based on LibreOffice 7.1 code. The in-development version is based on LibreOffice 7.3 code. Several older versions of Online were based on LibreOffice 6.x code.

Wrt extensions - indeed you may use any extension on your local installation, and the documents will be fully interoperable with the Online.

U+000A LINE FEED is not and has never been a no-break space. It is used for a line break within a paragraph. You type it as Shift+Enter. You can’t type it or paste it in fields of find or find & replace dialogs. You must tick Regular expressions and encode it as \n.

A no-break space is Unicode U+00A0 NO-BREAK SPACE. You type it (at least under Linux but may vary with keyboard configuration – you didn’t mention your OS) as Ctrl+Shift+Space. Due to the Ctrl, you can’t type it in dialog fields but you can paste the character since it is a standard one. There is no dedicated encoding for it (like \n for line break in regexp context).

There are other spaces with no-break property and various width in the Unicode block starting at U+2000.

Tip: a very useful feedback feature in Write is View>Formatting Marks and View>Field Shadings which show normally invisible “control” characters and add background shading to draw your attention on non-standard ambiguoug display. These hints do not print, so you can leave it permanently enabled.

I think I messed up \xA0 with \x0A.

When searchin, I used \xA0 and it worked, indeed.

What I’m looking for is a way to replace all \xA0 (non breaking space) with \x20 (space) without typing codes.

Atentamente,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.

Use Edit>Find & Replace in “normal” mode (no regexp mode). Paste your no-break space into Find: field (paste definitely works and this allows you to search for various variants of no-break spaces) and type one standard space in Replace: field.

Replace All if you’re feeling confident and brave or Replace one by one so that you can check individually and eventually cancel the preceding change.

1 Like

Hi!

Pasting the copied non breaking space in the search box returns no results, at least on my version of LibreOffice. That is the reason of my post.

But some fellow users told me it worked on their installations, as it seems to work on yours.

I think I’ll follow the tip of resetting my installed version, just in case I messed up some config.

Yours,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.

And why don’t you simply input a non-breaking space in the find field? What’s the problem?

How? Ctrl+Shift+Space don’t work there. And if do you try with menu Insert - Special Character it gets inserted in the text (where the cursor was when you open the Find and Replace dialog).
Tested with LibreOffice 7.2.7.2 on Windows 6.1.

In Linux, it is the sequence of compose space space. In Windows, try Alt+0160.

2 Likes

Copy and paste works with:

Versión: 6.4.7.2 (x86)
Id. de compilación: 639b8ac485750d5696d7590a72ef1b496725cfb5
Subprocs. CPU: 4; SO: Windows 6.1 Service Pack 1 Build 7601; Repres. IU: predet.; VCL: win;
Configuración regional: es-MX (es_MX); Idioma de IU: es-ES
Calc: threaded

No Regular Expressions needed. Maybe you need to reset your user profile.

I have the feeling that copy-paste worked on the LO 6.x I had on my job until last september, indeed.

Atentamente,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.