News for hackers. Stuff that matters.
Re:Chinese Twitter users live in a density 2x to 8x their En... by jrockway on Sunday October 11, 2009 @08:52PM (#875640)
If you are willing to do a bit of encoding/decoding, then you can map 2 or 3 latin-1 characters onto one unicode codepoint, and then tweet with that instead.

My understanding of UTF-8 indicates that you can actually represent any number as one character, but somewhere in the xterm / firefox / twitter pipeline, that gets fucked up. I think I have some code on github for this, actually:

http://gist.github.com/191446

The idea is to pack any utf-8 string into one character. It works for about 3 or 4 ASCII characters, but I think this is a perl bug rather than some fundamental limitation. Patches welcome.

(As an aside, I am always pleased when I get to use the (>>=) operator in Perl. And yes, I do pronounce it "bind" and not "right-shift-equals" ;)

Re:Chinese Twitter users live in a density 2x to 8x their En... by tlrobinson on Monday October 12, 2009 @12:14AM (#875976)
UTF-8 encodes any Unicode character using between 1 and 4 bytes. Also, some byte sequences aren't valid UTF-8. I don't think it's a Perl bug.