4 ms·
> The first one is not to try to fix things that are not broken or better, if you want to fix them, only fix the broken pieces and do not try to fix what is clu
by hodgesrm 10y ago
> The first one is not to try to fix things that are not broken or better, if you want to fix them, only fix the broken pieces and do not try to fix what is clunky but it does, somehow, work as it is intended to. For instance, UTF-8 is a wonderful idea and you need to do that but you can implement that in libraries or subsystems in such a way that you can use it in other operating systems more than create an operating system all around an encoding system.
I disagree 100%. The Plan9 use of Unicode and UTF8 was visionary.
Character set handling was seriously broken on all Unixen in the 1980s. One major problem was the range of character sets available on most hosts which constrained the type of character data applications could handle easily. Another was the plethora of competing, overlapping encodings like EUC-JIS and SJIS or the myriad of ISO-8859 encodings. This required constant mapping (or rather partial mapping) between different layers of the stack with attendant hits on usability, configuration problems, data corruption, etc.
Unicode with UTF-8 storage encoding almost completely solves these problems, the more so as software up and down the stack adopts the same conventions. At least on the projects I worked on then in the DBMS industry we would have gladly taken the hit to upgrade.
[edit] corrected typo
- bhaak 10y agoThe article almost makes it sound like UTF-8 was a Plan9 invention. I also don't understand why using UTF-8 was a bad idea. If I start a new OS from scratch, I would have to be brain-damaged to not use UTF-8 as the sole encoding (and other encodings being treated as second class citizens). I can understand the issue with taking the file abstraction to perfection. If by doing that you are incompatible to most of the software there is, you're going to have a hard time getting developers to develop for your OS. This could be somewhat alleviated with a ioctl compatibility library for the time being.
- jflatow 10y ago> The article almost makes it sound like UTF-8 was a Plan9 invention. It more or less was: https://en.wikipedia.org/wiki/UTF-8#History https://en.wikipedia.org/wiki/UTF-8#History
- bhaak 10y agoPlan9 and UTF-8 were invented by the same people. But Plan9 didn't influence the design of UTF-8 only in as far as having a better character encoding than the original 2 byte UCS encoding. And then Plan9 was used to showcase UTF-8.
- qwertyuiop924 10y agoCharacter indexing in UTF-8 is O(n). That's not enough to kill the awesome parts of it, though.
- nickpsecurity 10y agoIs there a list of alternatives with various tradfoffs mentioned?
- qwertyuiop924 10y agoUTF-32 is kinda-sorta O(1), but not really if you want to get what a user logically claims to a character.
- slededit 10y agoIt is for all but UTF-32. And even in the case of UTF-32 if you are indexing for what a user would logically consider a character then its O(n) there is well because of combining characters.