Why does Unicode have so many undefined characters?
Asked by
!a little to the left
I'm diving into Unicode for a project and I've come across something puzzling. While looking at the available code points, especially in the 4-byte range, I noticed a ton of undefined codes. I get that new codes might not be defined yet since Unicode hasn't used all the numbers, but what really baffled me are the undefined codes that appear between defined sets, like between adlam and indic-siyaq-numbers. It's even stranger to see undefined codes within specific sets, such as in the ethiopic-extended-b set where several codes are simply unassigned. This adds extra complexity to my implementation since I can't just check the ranges; I have to deal with these undefined codes as well. Is there a reason behind this design choice? I'm wondering if it's just a mess or if there's a valid reasoning behind leaving these gaps. Any insights on this would help a lot!
Answers
The gaps in Unicode can also be seen as a design choice to allow for expansion. Each block of characters starts at a number thatโs divisible by 16, which means there might be unfilled spots if the block doesnโt have a perfect fit. This way, if new characters are needed, they can just occupy the next available unassigned space. Plus, keeping characters organized in sets helps avoid chaos down the lineโeach new character can slot neatly into a block.
Reply to this answer
Unicode is definitely complex! Just remember that a Unicode code point isn't actually 'undefined'โit's just unassigned. And while it may seem like a hassle to deal with gaps in the code points, this allows for future flexibility. Unicode's designers wanted to ensure that if more characters need to be added, they could do so without disrupting established characters. So, they leave some placeholders open. To make things easier for developers, many languages just import updates directly from the Unicode standard without worrying about these specifics.
take-it-or-leave-it: I hear you, it's like you learn a lot but sometimes you wonder why itโs so convoluted! Thanks for clarifying that; Iโm definitely diving into the documentation to get better at this.
thread-tension-guide: For sure! It makes senseโtheyโd rather have open spaces than accidentally mess up yearsโ worth of documents if they reassign code points.
Reply to this answer
Youโre not alone in finding this frustrating! Think of it like a puzzle: some pieces are missing to allow for changes later. Itโs a strategic move, prioritizing flexibility over immediate perfection. As for checking valid codes, you're right to consider unassigned points as potentially valuable in the future. Just implement your checks, and remember, these gaps can actually prevent issues if something new pops up!
_reader_response: I get that perspective! Sometimes you just wish it could be simpler, but I appreciate the thought process behind it.
HORSESHOE PIT: Haha, yeah, itโs like preparing for growth! Iโll keep that in mind while I code my project.
Reply to this answer
Add your answer
Answers are reviewed before publication.
candlewick: That explains why things are the way they are! But still, can't they just fill the gaps when they define new characters?
score~tied: Totally. It feels weird to have unused codes, but I guess it helps when the needs of different languages evolve.