News for hackers. Stuff that matters.
Re:The useful character that is none by yardshop on Monday June 03, 2019 @01:43PM (#20085885)
It worked in Firefox Developer Edition.

Then I was able to paste it into SublimeText. I pasted it several times. SublimeText says the line is 6 characters long, but the cursor is still at the left edge! Then I copied that line, and my clipboard viewer shows 14 bytes for the Unicode entry, 12 bytes for the 6 characters and a two null bytes. As expected, the characters survive being saved with Trim Trailing Whitespace enabled. Reopening the file with a single-byte encoding (I tried Windows 1252) showed the characters. My hex viewer shows 6 occurrences of E2 80 8B.

Re:The useful character that is none by crehn on Monday June 03, 2019 @12:45PM (#20085238)
Tiny nitpick: U+200B is a Unicode character, not necessarily UTF-8.
Re:The useful character that is none by ygra on Monday June 03, 2019 @01:26PM (#20085699)
\u{200B} also has nothing to do with UTF-8. But I guess the inherent complexity with Unicode and its encodings means that most people will not care to understand how everything relates to each other.
Re:The useful character that is none by ChristianBundy on Tuesday June 04, 2019 @01:06AM (#20092085)
My understanding: Unicode is the dictionary maps codepoints (e.g. `0x200B`) with characters (e.g. ` `) and UTF-8 is a way to encode those codepoints with 1-4 bytes per character. Is that right?
Re:The useful character that is none by crehn on Tuesday June 04, 2019 @02:05AM (#20092334)
Pretty much. The charset (e.g. Unicode) just maps numbers to characters, and the encoding (e.g. UTF-8) translates sequences of numbers to bytes (and vice versa).

Unfortunately, there's a lot of blurred lines and loose usage of terminology due to misunderstandings and historical baggage (e.g. ambiguous usage of "charset", Microsoft's usage of "Unicode", "ASCII" used to refer to both charset and encoding, etc.) which contributes to the confusion.

Re:The useful character that is none by Narushia on Tuesday June 04, 2019 @02:23AM (#20092421)
I would suggest using the word joiner character (U+2060) for this purpose. If you use a zero-width space in a hashtag and it ends up at the end of the line, the characters after the ZWS will get broken to the next line. When you use word joiner, this will not happen and the whole word will stay connected. Example: https://imgur.com/0DposDa
Re:The useful character that is none by kalak on Monday June 03, 2019 @12:16PM (#20084863)
I'm not sure why, but doing a Google search for that character gives interesting results
Re:The useful character that is none by kgwxd on Monday June 03, 2019 @12:27PM (#20085007)
DDG gave me nothing but the Wikipedia snippet for "Zero-width space"
Re:The useful character that is none by Lowkeyloki on Monday June 03, 2019 @02:21PM (#20086385)
It's worth noting that last time I tried, you can't use this character to tweet a seemingly blank tweet. Twitter correctly disallows this as it would if you tried to tweet a normal space character and nothing else. However, there are plenty of other non-printing unicode characters that you can still use to tweet a seemingly empty tweet.

Hacker News also disallows this in its comments. YMMV with other non-printing characters.

Re:The useful character that is none by duxup on Monday June 03, 2019 @02:26PM (#20086444)
I wonder what the underlying reasons for the differences is from text field to text field.
Re:The useful character that is none by AstralStorm on Monday June 03, 2019 @03:35PM (#20087442)
Mostly use of Java as backend or not. It still has probably the best I18n character class support in standard library...
Re:The useful character that is none by yardshop on Monday June 03, 2019 @02:45PM (#20086694)
You can actually enter the character in this textbox, but they probably strip it out when posting.
Re:The useful character that is none by Lowkeyloki on Monday June 03, 2019 @04:26PM (#20088227)
It's definitely done on the backend with Twitter. Probably HN, too.
Re:The useful character that is none by saagarjha on Monday June 03, 2019 @12:26PM (#20084980)
> The button is tested in chrome browsers, if you use another browser it may not work for you.

It doesn’t work in Safari on iOS, FWIW.

Re:The useful character that is none by Abimelex on Monday June 03, 2019 @01:23PM (#20085659)
thanks, I try to fix that soon
Re:The useful character that is none by saagarjha on Monday June 03, 2019 @01:26PM (#20085690)
Thanks for looking into this!
Re:The useful character that is none by duxup on Monday June 03, 2019 @01:55PM (#20086050)
If only Rudy Giuliani had known about this he might not have had someone "invade" his text on Twitter.