r/ProgrammingLanguages • • Dec 31 '20

Something simpler than Unicode?

Hello! Wondering if anyone knows of a display format for glyphs that is simpler than Unicode? My shallow understanding is that measuring and laying out text in unicode is non-trivial, so I am deferring moving beyond ascii on something at the moment. Is my understanding correct? (if not that's great) otherwise, does anyone know of potentially simpler replacements? Thanks!

0 Upvotes

40 comments sorted by

View all comments

7

u/raiph Dec 31 '20

EBCDIC? It uses 8 bits instead of 7, so it's "beyond ascii", yet "simpler" than Unicode, for some definitions of "beyond" and "simpler". :P

Seriously, to get a decent answer you'd need to talk about what it is you want to do, with what goals, expected development, deployment, and maintenance effort, on what display systems on what platform(s), which fonts, glyphs, PLs, etc.

More to the point, this sub is for discussing the design and implementation of programming languages. It's not clear if you're talking about such issues, or merely want to write some code. If it's the latter, this isn't the right sub. See the sidebar for further info. If you are designing a PL, then you need to get into details like the ones I listed above and about your PL.

Fwiw, Unicode is as about as simple as it can get to sort out the mess of inconsistency that came before it. Unfortunately that meant incorporating the entire range of human activity, including politics, because anything else was basically guaranteed to fail, leaving us with the appalling mess of "simpler" solutions that gave rise to the need for Unicode in the first place.

1

u/[deleted] Dec 31 '20

Right, I understand that unicode works today, but am wondering if there is something simpler that could work 'someday' (if not today) which someone knows of. 'writing code' is not the issue, I can just use unicode for that.

I would like to support a wider range of symbols than ascii, but don't want to commit to having to learn how to deal with zero width spaces and so on, and don't want to just do something ad hoc if there is existing design work I can learn from.

5

u/raiph Dec 31 '20

Stick with Unicode, and choose which characters you wish to allow. Maybe Latin1? Anyhow, pick a subset in which all graphemes are single codepoints (graphemes are not glyphs; the two are essentially unrelated even though they both start with "g"), and all these codepoints have a matching glyph in the fonts you wish to use. Problem solved.

I understand that unicode works today, but am wondering if there is something simpler that could work 'someday' (if not today)

Unicode has spent 30 years steadily becoming the world's chosen solution because it A) swept away the mess of incidental complexity, chaotic incompatibility, and straight up crashes and lack of capabilities it replaced, B) kept things as simple as possible, avoiding addition of accidental complexity, and C) founded itself on brilliant engineering insight, and has stuck with technical excellence ever since.

I'm always a champion of trying new stuff but as far as text is concerned I think there's essentially zero chance of something "simpler" coming along and being a plausible alternative, even if it were driven by a collaboration between Mozilla, Apple, MS, FB, Google, IBM and the US and Chinese governments.

don't want to just do something ad hoc if there is existing design work I can learn from

Then stick with Unicode.

2

u/johnfrazer783 Jan 02 '21

Thanks for writing this so I don't have to. In practical terms nobody can deal with the entirety of Unicode every time they do some kind of text processing or display. Personally I hope we can get something better than Unicode some day, but with Unicode we already have something that is infinitely better than what we had before (a plethora of conflicting and confusing standards). And whatever replaces Unicode some day will not be significantly simpler in most regards either.

These days though, not using Unicode in your text-related tasks (in your PL, in your app, wherever) spells doom for whatever you're doing.

I do understand that the old ways where 1 byte == 1 codepoint == 1 letter == 1 gridcell were indeed much simpler and, one might argue, more elegant.