When I copy text from internet, it happens that I get this character ° at the end of a (winword) paragraph.
It does not correspond to ° (of the ^ ° - key) (this ° is smaller than the ° at then end of a paragraph).
Do you know a code is to replace ° through a space (or something else) ?
I think ° corresponds to ALT+0176 of Times New Roman.
Replace ° character through blank character
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
From Sergey:Sergey Tkachenko wrote:I received your email.
These characters are non-breaking spaces. They are displayed exactly like normal spaces. Circles are displayed only in "show-spacial-characters" mode.
Details are sent by email.
As I can see, this character is a non-breaking space. It looks exactly like a normal space, the only difference is that text cannot be wrapped on this space.
A circle that you can see is not this character, it is a special mark that is used to display non-breaking spaces in the "show special characters" mode, just like a small dot for normal spaces, or arrow for tabs.
If you want to replace these characters to spaces as an editing procedure, the simplest way is using SearchText for searching for #$A0 character, and InsertText to insert space in its place.
Thanks, problem solved:
procedure TForm1.nonBreakingSpaceClick(Sender: TObject);
begin
RVSetLinearCaretPos(memo,0); //rd -> TReplaceDialog
rd.FindText := #$A0; rd.ReplaceText:= #32;
while Memo.SearchText(rd.FindText,GetRVESearchOptions(rd.Options)) do
Memo.InsertText(rd.ReplaceText,False);
end;