Page 1 of 2

Re: [Bug] Wrong Encoding Special Characters

Posted: 10 Jul 2017, 07:59
by magnetik
I cannot confirm. I see that it's encoded as "\ud83c\udfae\" which seems correct

What client are you using?

Re: [Bug] Wrong Encoding Special Characters

Posted: 18 Jul 2017, 13:07
by magnetik
What bug on the playerpage? You mean in the nickname?

I've added one in my nickname, and it's displayed well: https://www.maniaplanet.com/players/magnetik.org

Re: [Bug] Wrong Encoding Special Characters

Posted: 18 Jul 2017, 15:56
by magnetik
kremsy wrote: 07 Jul 2017, 17:50 Example: Character: "🎮" Response from Webservice: ""
Theses are 2 different char, first one is U+1F3AE (the game pad) and the second one is U+E964 (something like a shaped stone)

Re: [Bug] Wrong Encoding Special Characters

Posted: 18 Jul 2017, 17:58
by zocka
https://unicode-table.com/en/blocks/private-use-area/ wrote:In Unicode, the Private Use Areas (PUA) are three ranges of code points (U+E000–U+F8FF in the BMP, and in planes 15 and 16) that, by definition, will not be assigned characters by the Unicode Consortium. The code points in these areas cannot be considered as standardized characters in Unicode itself. They are intentionally left undefined so that third parties may define their own characters without conflicting with Unicode Consortium assignments.
It's mapped in the client to an icon from https://github.com/nicodinh/kenney-icon-font/ (see the footnote on the emojis manialink) and thus these icons are not displayed on the maniaplanet website either.

Re: [Bug] Wrong Encoding Special Characters

Posted: 18 Jul 2017, 18:19
by magnetik
That's super exact. There are some ways to do the same using CSS I guess but I never had time to do it

Re: [Bug] Wrong Encoding Special Characters

Posted: 18 Jul 2017, 21:41
by zocka

Code: Select all

nickname.split('').map(c => {const x = c.charCodeAt(0); return x >= 0xf000 && x >= 0xf2e0 ? `<i class="fa" data-icon="&#${x};"></i>` : c).join('')
and 0xe900 <= x <= 0xe9e1 for .ki
idk if there is any useful character replacement function.

Code: Select all

.fa[data-icon]:before, .ki[data-icon]:before {
  content: attr(data-icon);
}
(tested with font awesome (and not such ugly rendering ^^). kenney-icon-font seems to work the same way)
Hype for a the next playerpage update xD