Re:My int is too big
by wolf550e on Friday July 15, 2016 @10:16PM
(#12104940)
Unicode code points are 21 bits long. I wonder if something out there stores strings by packing 3 code points per uint64_t.
[ Parent
| on HN ]
Re:My int is too big
by charleslmunger on Friday July 15, 2016 @11:49PM
(#12105158)
Maybe, but almost everything outside the basic multilingual plane is so infrequently used that it's a waste of space to use a fixed-width format.
But I could see it being a useful replacement for UTF-32... If you need to be able to calculate code points in constant time, and you don't mind wasting one bit out of every 64. Self synchronizing, constant time code point count from buffer size, and close to as space efficient as UTF-16, but with none of the surrogate mess.