Better HN
topnewbestaskshowjobs
Log inSign up

unascribed

10 karma · joined Aug 3, 2019 (7y ago) · 5 submissions

[ my public key: https://keybase.io/unascribed; my proof: https://keybase.io/unascribed/sigs/OqsplnwqEQWHbrAPp679Z30o7gCJWsz4Y2RNgVGw_ys ]
Submissions

comment 7y ago · link · parent

Wasn't really expecting this post to leave my circles, sure am glad now I checked my sources.

Look, ma, I'm on Hacker News!

comment 7y ago · link · parent

I would've mentioned this in my post but didn't feel I could do the topic justice as I'm not submersed in it like I am the UTF-16 tragedy. This is indeed an important aside, though.

comment 7y ago · link · parent

I've personally done this in Java, as mentioned. Generally I use fastutil to create an IntList (which is just an int[] with some conveniences) and use Java's Character class to convert between UTF-16 and UCS-4 on-the-fly.

It's not very fast, but it makes flawless Unicode support easy. :P

comment 7y ago · link · parent

Yes, that was the intent. C itself obviously just sees chars as a number, but in C itself strings have no real meaning at all. The fact the kernel treats them as opaque byte sequences is the important part.

comment 7y ago · link · parent

This year is mentioned on the Wikipedia page and its references as the sort of "genesis date" of all the companies' involvement and is more or less when the UCS-2 tragedy began. (This is a post specifically about UTF-16 and UCS-2, not the entire history of Unicode. That'd be... considerably longer.)

I mention in another post (Correction: In a draft of a post.) I'm still stuck on JDK 8 for various reasons out of my control, and am generally unaware of changes made in 9 or later. I'll amend the post to reflect that the feature shipped.