What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

๐Ÿ The Bug ๐Ÿ

The chat autoboxing of cited questions and answers screws up when those contain Unicode codepoints from any of the astral planes, like ๐Ÿ˜ฟยน, ๐”๐ฏ๐‘…๐จ๐‘‰๐ฏ๐ป ยฒ, or ๐Œฐ๐„๐„๐Œฐ ๐Œฟ๐Œฝ๐ƒ๐Œฐ๐‚ ๐Œธ๐Œฟ ๐Œน๐Œฝ ๐Œท๐Œน๐Œผ๐Œน๐Œฝ๐Œฐ๐Œผ ยณ. Those code points are all over 0xFFFF; see the footnotes for just what they are.

This seems like some sort of bug where the code is treating Unicode as though it were UCS-2, with only 16-bit code points. But itโ€™s not. Unicode goes to 0x10_FFFF, and so it needs 21 bits (well, 20.087463, but whoโ€™s counting?).

The point is not whether these codepoints are โ€œneededโ€ in anybodyโ€™s humble opinion. Itโ€™s about a bug in the code, which is something else altogether.

Example 1

This answer autoboxes in chat to this:

But it is supposed to look like this, the way it does if you go to it directly:


Example 2

And this answer shows that the problem is not just a one-shot screwup, because it autoboxes to

but is supposed to look like, which it does if you go to it:


Footnotes

  1. ๐Ÿ˜ฟ is U+1F63F, that is, CRYING CAT FACE, so \x{1F63F} or \N{CRYING CAT FACE}.
  2. ๐”๐ฏ๐‘…๐จ๐‘‰๐ฏ๐ป is Deseret written in the eponymous script, so \x{1043C}\x{1042F}\x{10445}\x{10428}\x{10449}\x{1042F}\x{1043B}.
  3. ๐Œฐ๐„๐„๐Œฐ ๐Œฟ๐Œฝ๐ƒ๐Œฐ๐‚ ๐Œธ๐Œฟ ๐Œน๐Œฝ ๐Œท๐Œน๐Œผ๐Œน๐Œฝ๐Œฐ๐Œผ is atta unsar รพu in himinam written in the Gothic script, and language. So

    \x{10414}\x{10344}\x{10344}\x{10330} \x{1033F}\x{1033D}\x{10343}\x{10330}\x{10342} \x{10338}\x{1033F} \x{10339}\x{1033D} \x{10337}\x{10339}\x{1033C}\x{10339}\x{1033D}\x{10330}\x{1033C}

share|improve this question
    
None of these characters even render for me to begin with, so who cares about the oneboxing. Don't use these characters. –  animuson Aug 19 '12 at 20:07
    
@animuson Try Dejavu? Anyways here's how it renders on an iPod touch running iOS6 with the new Emoji box.com/shared/1f7a10b3fdb4db3fc53f –  Cole Johnson Aug 19 '12 at 22:27
1  
"Fontaliciousness" Best. Word. Ever. –  Robotnik Aug 20 '12 at 5:40
7  
@animuson Not only does your spurious comment utterly misunderstand and misrepresent the situation, I even addressed this fallacity at the top of my posting when I wrote โ€œThe point is not whether these codepoints are โ€˜neededโ€™ in anybodyโ€™s humble opinion. Itโ€™s about a bug in the code, which is something else altogether.โ€ Even if your opinion is not a humble one, it continues to not apply here. –  tchrist Aug 20 '12 at 14:40
    
And I'm saying who cares about accounting for characters that only a minority of users will even see? –  animuson Aug 20 '12 at 18:22
1  
@animuson: The crying cat face renders for me. It, at least, deserves to live. –  minitech Aug 21 '12 at 2:26

1 Answer 1

The fact that thy are all over U+FFFF sounds like it could be caused by the way ASP handles strings. All strings in .NET are UTF-16. The reason some work are because they are surrogate pairs that are valid byte sequences

share|improve this answer
    
That must be incorrect, because UCS-2 cannot represent code points above U+FFFF, yet these come through ust fine when you are looking at the real answers. Therefore, the strings cannot be in UCS-2! Itโ€™s only chat that is busted. Even weirder, the cat emoticon survives the autobox, but nothing else does. But it is just as astral as the rest of them. It is super-strange that it alone survives. Anyway, the internal binary representation shouldnโ€™t matter, because Unicode is Unicode. If the rep show through, thereโ€™s a bug. BTW, UCS-2 is not a valid Uniform Transformation Format. –  tchrist Aug 19 '12 at 18:49
    
@tchrist UCS2 can represent some code points above U+FFFF, just not all. (I am using UCS2 instead of UTF16, but they are generally the same) –  Cole Johnson Aug 19 '12 at 18:54
5  
.NET uses UTF-16, not UCS-2. –  Michael Petrotta Aug 19 '12 at 18:56
    
@Michael correct. I'm always mixing then up –  Cole Johnson Aug 19 '12 at 18:57
    
I would agree with you that this is likely a UTF-16โ€“related bug. –  tchrist Aug 20 '12 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .