Page 1 of 3

Problem with Paste Unformatted Text

Posted: 13 Dec 2022 18:27
by BillH
This topic is related to the discussion in the New Wish List Requests forum, Plain Text Only setting (21280), but I didn't want to muddy up that topic.

I am having a problem with Paste Unformatted Text.

Go to the website, http://www.rawbw.com/~hinshaw/cgi-bin/id?302.

Copy these lines:

Image1.jpg
Image1.jpg (14.27 KiB) Viewed 1259 times

Create a local note for an individual using the Notes tab Add Note button.

In the blank note field under the Add Note button, right click and select Paste Unformatted Text. The note looks like this:

image2.jpg
image2.jpg (21.26 KiB) Viewed 1259 times

However, when I look at the GEDCOM, it looks like this:

1 NOTE Nicholas Hancher
2 CONT B: 1705
2 CONT D: 1777
2 CONT M: Rebecca Smith
2 CONT <font="Segoe UI Symbol",,1>├──</font> John Hancher (1734-1793) 1,2,3,4,5,6
2 CONT <font="Segoe UI Symbol",,1>├──</font> William Henshaw (1736-1799) 1,2,3,4,5,6
2 CONT <font="Segoe UI Symbol",,1>├──</font> Elenor Henshaw (1737-?) 1,2,3,4,5,6,7
2 CONT <font="Segoe UI Symbol",,1>├──</font> Mary Henshaw (1739-?) 2,3,4,8
2 CONT <font="Segoe UI Symbol",,1>└──</font> Hannah Henshaw (1746-\<1777) 2,3,4,8
2 _FMT 1

Despite having used Paste Unformatted Text, the result is text with the font Segoe UI Symbol. I do not have Seqoe UI Symbol set for any default font.

Even if I copy from the website, paste into Notepad, and then copy and paste into the note in FH, I get the same result.

This seems like a bug. Should I report it to CP? Can anyone else reproduce this problem?

Thanks,
Bill

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 18:38
by tatewise
Bill, that is typical of the kind of bug that is being experienced and triggered the Wish List Request discussions.

If the Ctrl+Alt [...] option is used to open the plain text editor, then the unwanted <font="Segoe UI Symbol",,1> and </font> formatting can be removed leaving just the symbols which are fine in the default font of Tahoma 10 pt and in reports that use Times New Roman font.

If you use that Ctrl+Alt [...] option to open the plain text editor then pasting is truly plain text with no formatting.

BTW: The backslash \ before less than < also needs removing ( \ is a rich text escape because < is a magic character ).

Yes, report it to CP to give them another explicit example of where Paste Unformatted Text does not work correctly.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 18:41
by ColeValleyGirl
The 'Segoe UI' problem has been discussed elsewhere and may be a bug...

Unless it appears in the text copied from the website...

which it doesn't(?) as pasting into Word doesn't have the same problem.

Although, the CSS requires font-family: monospace for the links so perhaps FH is honouring that the best way it can????

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 18:54
by tatewise
ColeValleyGirl wrote:
13 Dec 2022 18:41
Although, the CSS requires font-family: monospace for the links so perhaps FH is honouring that the best way it can?
But it is (correctly) not attempting to honour the supercripts at the end of the lines, nor the bold Nicholas Hancher.
So it is selectively faulty at interpreting Paste Unformatted Text.
It is not strictly the 'Segoe UI' problem because here it is 'Segoe UI Symbol' which Bill has not set for any font.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 19:01
by BillH
Thanks Mike and Helen,

I have created a ticket with CP. I will report back what they respond.

Bill

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 19:06
by ColeValleyGirl
tatewise wrote:
13 Dec 2022 18:54
It is not strictly the 'Segoe UI' problem because here it is 'Segoe UI Symbol' which Bill has not set for any font.
It has still been discussed elsewhere. I shall heretoforth refer to it as the Segoe UI/Segou UI Symbol/Cambria Math problem.
tatewise wrote:
13 Dec 2022 18:54
But it is (correctly) not attempting to honour the superscripts at the end of the lines, nor the bold Nicholas Hancher.
The superscripts in the original css are coded using font-size smaller and sup, but don't involve a font-family change. The FH rich text editor doesn't have 'smaller' or 'sup' support, so those can't be honoured.

The missing bold? It depends where you start the selection from:
Screenshot 2022-12-13 190448.jpg
Screenshot 2022-12-13 190448.jpg (49.99 KiB) Viewed 1224 times

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 19:15
by BillH
ColeValleyGirl wrote:
13 Dec 2022 18:41
Although, the CSS requires font-family: monospace for the links so perhaps FH is honouring that the best way it can????
Helen,

I guess my thought is that if I say Paste Unformatted Text, I really don't want any formatting at all.

Bill

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 19:22
by NickWalker
Yes I think this must be a bug.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 19:27
by ColeValleyGirl
BillH wrote:
13 Dec 2022 19:15

Helen,

I guess my thought is that if I say Paste Unformatted Text, I really don't want any formatting at all.

Bill
Ditto. I was just wondering if there was a clue to the bug in the css.

Looking at it another way, the font specification surround the graphic element of the paste, which might be another clue.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 20:49
by davidf
ColeValleyGirl wrote:
13 Dec 2022 18:41
The 'Segoe UI' problem has been discussed elsewhere and may be a bug...

Unless it appears in the text copied from the website...

which it doesn't(?) as pasting into Word doesn't have the same problem.

Although, the CSS requires font-family: monospace for the links so perhaps FH is honouring that the best way it can????
The text in this example is also within HTML <pre> tags which normally require monospaced fonts.

Not that that excuses formatting a "paste unformatted"!

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 21:23
by BillH
One thing that really surprised me was that if I copy from the web site and paste into Notepad and then cut and paste that into FH using Paste Unformatted Text, I still get the formatting in FH. I thought Notepad was plain text only.

So it seems like something in the text itself must be causing FH to add the formatting having nothing to do with links. There are no HTML tags or links in the Notepad text.

Bill

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 21:57
by AdrianBruce
I just tried pasting via Notepad++ and similarly ended up with "Segoe UI Symbol" fonts.

Can I suggest an alternative avenue, which may show up my lack of understanding of fonts?

Are the ├── characters actually in whatever FH is using as its UI font? Or are they only in "Segoe UI Symbol", in which case the text has to be Rich Text in order to access those characters? So it's nothing to do with formatting per se but everything to do with needing those characters from somewhere? (That logic may or may not be correct in its conclusion where to find the characters in question)

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 22:26
by tatewise
Adrian, read my first Reply to Bill that explains those symbols are rendered perfectly in Tahoma and Times New Roman.
They are Unicode symbols supported by many font sets.

If those symbols did not exist in the default font then formatting is not a valid solution.
FH should honour the Paste Unformatted Text command and remove the symbols entirely, perhaps with a warning.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 22:34
by BillH
tatewise wrote:
13 Dec 2022 22:26
FH should honour the Paste Unformatted Text command and remove the symbols entirely, perhaps with a warning.
Do they really need to be removed? Shouldn't they just be kept and displayed in the default font rather than changing the font to Seqoe UI Symbol? Or do you mean to remove them only if they are not in the default font?

Bill

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 22:35
by AdrianBruce
tatewise wrote:
13 Dec 2022 22:26
Adrian, read my first Reply to Bill that explains those symbols are rendered perfectly in Tahoma and Times New Roman.
They are Unicode symbols supported by many font sets. ...
Fair enough... I did wonder how to check but would have been looking in the wrong place it appears. :?

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 22:47
by ADC65
Could I suggest copying without the last (Hannah Henshaw) line, and seeing what happens then?

I have a suspicion that it's the less-than sign ("<") which might be triggering a format since this is a typical open-bracket for an HTML tag.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 22:50
by NickWalker
Ancestral Sources has a 'rich text' option as has been discussed elsewhere, so users who only want plain text can opt for that and AS then uses a normal text box. However, interestingly, if I paste that unformatted text in the rich-text control in AS it does exactly the same thing that FH does, inserting this: <font="Segoe UI Symbol","swiss",1>├──</font>

The text is unformatted being pasted from notepad but it looks like the Microsoft rich-text control that AS and FH use is substituting that font. I don't really have a particularly good knowledge of fonts and the way character sets work so don't have a good explanation for this yet but I suspect this may be a difficult issue for CP to solve.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 22:57
by BillH
satyricon wrote:
13 Dec 2022 22:47
Could I suggest copying without the last (Hannah Henshaw) line, and seeing what happens then?

I have a suspicion that it's the less-than sign ("<") which might be triggering a format since this is a typical open-bracket for an HTML tag.
Adrian,

I just tried this and there was no difference. I still get the Seqoe UI Symbol font info added.

Bill

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 23:01
by tatewise
Bill, yes, I meant the character should only be deleted if it does not exist in the default font.

Adrian Cook, why not try it yourself?
If the trailing part of any of the lines is copied unformatted then no formatting is applied even if the < is included.
If the leading few lines are copied unformatted then the font format is still applied.

Tomorrow I plan to try pasting that same web text into FH V6 plain text fields and plain text editor box.

Re: Problem with Paste Unformatted Text

Posted: 13 Dec 2022 23:07
by BillH
NickWalker wrote:
13 Dec 2022 22:50
I don't really have a particularly good knowledge of fonts and the way character sets work so don't have a good explanation for this yet but I suspect this may be a difficult issue for CP to solve.
That is interesting. Sounds like it may be a Microsoft problem.

I guess I have a workaround. When I create a new note or text I can open a plain text edit window using ctrl-alt-double click and paste it there. This seems to create an unformatted version without the font info. It's a bit of a pain and will be hard to remember to do.

Bill

Re: Problem with Paste Unformatted Text

Posted: 14 Dec 2022 10:06
by ColeValleyGirl
Technical musing: is RichEdit Font Binding relevant? Poking around on the 'net it seems to be at the root of a number of unexpected font 'occurences' in the Rich Edit control...

Re: Problem with Paste Unformatted Text

Posted: 14 Dec 2022 11:11
by davidf
Now I know more about fonts that I either want to know or am capable of absorbing.

Gist seems to be
  • If "the system" (here the interaction between the OS clipboard application and FH) can't decide on what font to use to render a character (often something non alpha-numeric), it has a fallback mechanism to try and determine the best font to use to render that character.
  • It does not see a "font-switch" for this purpose as "formatting" - so such switching gets included in "paste unformatted" - and shows up when we examine the GEDCOM.
  • The font switched to is often Segoe UI
    Wikipedia wrote:Segoe UI ("User Interface") is a member of the Segoe family used in Microsoft products for user interface text, as well as for some online user assistance material, intended to improve the consistency in how users see all text across all languages. It is distinguishable from its predecessor Tahoma and the OS X user interface font Lucida Grande by its rounder letters.
    (My emphasis)
  • So is Segoe UI available in FH7 Tools>Preferences>Display>Default Font?
    • If it is do we eliminate a whole range of problems concerned with "unformatted paste" being unable to find a character in the "display default font"?
    • Is the result of changing the FH Default Display Font to Segoe UI, tolerable - or does it look a mess compared to the Tahoma which most use?
  • If this does improve some of the issues, does that help us point the finger at "font substitute searching" (an OS issue) and the possibility that font-switching code is not seen as "formatting" (an OS/FH issue)?

Re: Problem with Paste Unformatted Text

Posted: 14 Dec 2022 11:22
by ADC65
tatewise wrote:
13 Dec 2022 23:01
Adrian Cook, why not try it yourself?
I knew you'd ask that :lol: I was just closing down for the evening and I didn't have the mental energy left to start a new GEDCOM to test it with. I've tried this morning with the same results you and Bill got. It was just a thought.
BillH wrote:
13 Dec 2022 22:57
Adrian, I just tried this and there was no difference. I still get the Seqoe UI Symbol font info added. Bill
Thanks for trying Bill.

Re: Problem with Paste Unformatted Text

Posted: 14 Dec 2022 11:31
by ColeValleyGirl
davidf wrote:
14 Dec 2022 11:11
Now I know more about fonts that I either want to know or am capable of absorbing.
It made my head hurt!
So is Segoe UI available in FH7 Tools>Preferences>Display>Default Font?
Yes. IIRC it's present on all modern windows systems by default. And setting it as default seems to prevent the unexpected Segoe font switches. But (a) I for one hate it with a passion and don't want to work with it as my default font; (b) it wouldn't cure the Cambria Math and Segoe UI Symbol appearances, so it isn't a good workaround.

Re: Problem with Paste Unformatted Text

Posted: 14 Dec 2022 11:32
by ColeValleyGirl
davidf wrote:
14 Dec 2022 11:11
Now I know more about fonts that I either want to know or am capable of absorbing.
It made my head hurt!
So is Segoe UI available in FH7 Tools>Preferences>Display>Default Font?
Yes. IIRC it's present on all modern windows systems by default. And setting it as default seems to prevent the unexpected Segoe font switches. But (a) I for one hate it with a passion and don't want to work with it as my default font; (b) it wouldn't cure the Cambria Math and Segoe UI Symbol appearances, so it isn't a good workaround.