Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Funny how it triggered a bug in Firefox. When the tab is unfocused, its title in the handle is "𝑼𝒏…", but when it gets the focus it becomes "𝑼<D835>…" (in a square box). The next codepoint is U+1D48F whose UTF-16 BE encoding is d8 35 dc 8f.

I'd say that the truncation algorithm operates on bytes and that it can't make sense of d8 35, but I'm not too sure how to fix that since graphemes can have arbitrary length (right?). Do you have to compute the width in advance?



It seems like this is a known bug: https://bugzilla.mozilla.org/show_bug.cgi?id=921528


http://www.unicode.org/reports/tr29/

There are libraries for doing it in Javascript: https://www.npmjs.org/package/grapheme-breaker (is that part of the Firefox UI done in Javascript? I've no idea)


>I'd say that the truncation algorithm operates on bytes

This seems likely, as another notable weirdness is that even with full width tabs, where there's plenty of space for at least "π‘Όπ’π’Šπ’„π’π’…π’† 𝑻𝒆𝒙𝒕..." it still only shows "π‘Όπ’π’Šπ’„π’...".


Hm.. i'm on nightly and seems to be unaffected by this problem.


It depends on the size of the tab headers.


I am using FF Dev Edition and see "Unico<D835>..." regardless of focus. Weird.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: