Localization / UTF support (Setting up a linear frame buffer)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Localization / UTF support (Setting up a linear frame bu

Post by SpyderTL »

How about using escape characters? For example:
fil[u0128]
fil[u0181]

(Those aren't the actual unicode numbers, btw... Probably)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
bigbob
Member
Member
Posts: 122
Joined: Tue Oct 01, 2013 2:50 am
Location: Budapest, Hungary
Contact:

Re: Localization / UTF support (Setting up a linear frame bu

Post by bigbob »

SpyderTL wrote:How about using escape characters? For example:
fil[u0128]
fil[u0181]

(Those aren't the actual unicode numbers, btw... Probably)
I haven't thought about that yet. The idea ("dirty little trick" of skipping unicode chars) could be improved, but for the time being the currently implemented version is enough for me.
There are so many things to implement.
Hellbender
Member
Member
Posts: 63
Joined: Fri May 01, 2015 2:23 am
Libera.chat IRC: Hellbender

Re: Localization / UTF support (Setting up a linear frame bu

Post by Hellbender »

SpyderTL wrote:How about using escape characters? For example:
fil[u0128]
fil[u0181]
I though about going this route, except using "shift-in" and "shift-out", because
"fil[u0128]" is completely valid name (that has 10 ASCII characters).

So the user can input e.g.

Code: Select all

"rm fil", ctrl+O, "0128", ctrl+N, enter
to delete the file.

Console might use some visual cue (underline, reversed colors, etc)
so that the user can see the difference between those escaped unicode sequences
and similar looking non-escaped names.

I have no clue what kinds of keyboards people around the world have, but I just
have to add support for what ever numerals they use. Some roman might have to
do e.g.

Code: Select all

"rm fil", ctrl+O, "CCXCVI", ctrl+N, enter
Obviously ctrl+O and ctrl+N has to be bound to some keystroke that exists in
their keyboard.
Hellbender OS at github.
Hellbender
Member
Member
Posts: 63
Joined: Fri May 01, 2015 2:23 am
Libera.chat IRC: Hellbender

Re: Localization / UTF support (Setting up a linear frame bu

Post by Hellbender »

To expound, my console will be based on the following principle:
"display only symbols the user can enter, everything else is an escaped number".
So the console will need the following information:

1. list of unicode characters the user can enter (not just technically able to, but "knows how to").
2. glyphs for characters in 1.
3. an algorithm to convert a binary number into users numeral system (obviously using only numeral symbols found in 1.).
4. an algorithm to convert a numeral string (of symbols in 1) into a binary number.
5. key codes for crtl+O, crtl+N (this is actually part of the keyboard service).

(altought my initial VGA text mode console has to limit 1. as the intersection of enterable characeters and the code page 437..)
Hellbender OS at github.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Localization / UTF support (Setting up a linear frame bu

Post by Combuster »

SpyderTL wrote:How about using escape characters? For example:
fil[u0128]
fil[u0181]

(Those aren't the actual unicode numbers, btw... Probably)
How does the user know which combination to type when he only gets block glyphs presented on the screen (And in particular because this once was a problem to me, do you know all the CJK characters by hard or can you look them up efficiently?)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply