Tab title truncated between surrogate pair

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Keiji
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2017-09-27, 19:31

Tab title truncated between surrogate pair

Unread post by Keiji » 2018-06-16, 12:48

This YouTube video title gets cut off with a "D83D" character just before the ... in the tab title:

Image

I was curious if it depends on display scaling, but apparently not - here's how it appears on 200% display scaling:

Image

I'm not sure how PM's string handling or abbreviation algorithm works but something isn't right here! :)

Using latest PM version - 27.9.3 (64-bit)
Last edited by Keiji on 2018-06-16, 12:49, edited 1 time in total.

yami_

Re: Tab title truncated between surrogate pair

Unread post by yami_ » 2018-06-16, 22:17

I can confirm it:
utf16_4byte.png
If the tab title must be cut after a 4 byte utf16 char, then only the high-surrogate code point of this char will be displayed.

yami_

Re: Tab title truncated between surrogate pair

Unread post by yami_ » 2018-07-01, 10:13

I did some more tests today, here is what I discovered:
  • This issue affects every XUL element with crop attribute set
  • This seems to be fixed by UXP

Keiji
Apollo supporter
Apollo supporter
Posts: 32
Joined: 2017-09-27, 19:31

Re: Tab title truncated between surrogate pair

Unread post by Keiji » 2018-07-06, 19:15

yami_ wrote:
  • This seems to be fixed by UXP
Ooh, excellent, so we can expect it to be fixed in the next major release then.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Tab title truncated between surrogate pair

Unread post by Moonchild » 2018-07-06, 20:39

Keiji wrote:
yami_ wrote:
  • This seems to be fixed by UXP
Ooh, excellent, so we can expect it to be fixed in the next major release then.
indeed!
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked