fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Safari: The browser icon shows nonsense when GhostText is enabled (UTF8 issue) #250

Closed fregante closed 1 year ago

fregante commented 1 year ago

It's handled here, but still not fixed:

https://github.com/fregante/GhostText/blob/b9f3c690b8849781226ac6e8d9ea5b2b48cc25b2/source/background.js#L101

Setup

Browser: Safari

Description

Screenshot

Solutions?

fregante commented 1 year ago

@xeenon sorry to tag you here, but I saw your comment on Apple’s forums and encoding the character didn't seem to fix it. Is there anything that can be done here? This looks like a "bug" since it works in every other browser.

xeenon commented 1 year ago

Hmm. So charset and a BOM didn't work?

fregante commented 1 year ago

I haven't tried BOM yet because I'll have to figure out a way to add it after the build.

As for charset, how? That string lives in the background script. I suppose I could turn it into background.html but I'll have to use a background worker eventually so it would be a temporary fix.

fregante commented 1 year ago

So, yes, the BOM fixes it, even though I wish I didn't have to do this manually before publishing it.

I had also tried setting the right encoding in Xcode but that didn't fix it:

Screenshot 4
xeenon commented 1 year ago

The Xcode encoding only change how the text is parsed for display in Xcode.

xeenon commented 1 year ago

Can you file an issue in Feedback Assistant so we can debug this some more on our end? There still might be something wrong here that WebKit or Safari should do different.