Non-breaking space with copy-pasted text

Hello,

I want to use Scrivener to edit a Thai language novel. As soon as I copy-pasted my novel from a different source, I noticed that the program wraps text according to space characters present in the text. However, Thai uses spaces to separate sentences, and has no specific word-separating character. The result is awkward text wrapping that is very difficult to read.

Is there an easy way to either replace all space characters with non-breaking spaces, or are there settings that makes Scrivener treat all spaces as non-breaking? Alternately, is there a way for Scrivener to wrap Thai text according to dictionary word separations? Any other suggestions or workarounds would also be greatly appreciated. Thank you.

If you know how to type a non-breaking space (alt-space), you can use Find & Replace to substitute non-breaking space for regular space.

(There are language settings both in Scrivener and in the MacOS system. I wonder if setting these to the language of the novel will help with this issue. Unsure.)

Thank you for your reply. I can’t seem to be able to use Find & Replace to change spaces to non-breaking spaces. When I typed a non-breaking space in the Find & Replace box, it shows nothing. :sob: :sob: Can you provide step by step instructions?

Unfortunately, language settings seem to only effect the interface.

You say it doesn’t show anything, but that is not surprising for a whitespace character. Did you try telling it to do the substitution on a test document and it failed?

Are you sure that the gaps in the text are plain spaces? Might want to Show Invisibles and check, just in case they might be some other kind of whitespace. You could select and copy one and paste it into the find field.

…non-breaking symbol shows up as a degree sign, but it cannot be copied properly. When pasted in the Replace field, it shows up as a dot sign (normal space).

Can you not just type that non-breaking space into the replace field? I am on Mac, where non-breaking space is obtained by typing Alt-Space.

FWIW, on Mac Scriv searching and replacing between spaces and non-breaking spaces works just fine.

It doesn’t work under windows.

I think using a RegEx formula would be necessary, in the present case.

1 Like

This is one of those cases where a small sample (two or three sentences) would make a huge difference. Not that I want to ruin the guesswork or anything.

2 Likes

Windows user here.

You don’t need it to work in your Scrivener editor, so set it up as a replacement in Compile.

Here’s examples. Yes, the symbol for non-break space is invisible in the replace field, nonetheless it works when compiling to Word or PDF. Same thing applies with non-breaking hyphens, you can’t tell the difference in the hyphen’s display in replace, but it too works.

image