[BRLTTY] Braille coding in Gnopernicus

Bill Haneman Bill.Haneman at Sun.COM
Tue Nov 29 12:08:09 EST 2005


remus draica wrote:...

>>The other problem is that currently, unless I am mistaken, gnopernicus' 
>>braille tables are 8 bit tables, and gnopernicus always assumes Latin-1.
>>
>>    
>>
>That's right.
>
>  
>
>>Latin-2 is also 8-bit, so in theory the current gnopernicus architecture 
>>could handle this, but it would need to know when to convert from UTF-8 
>>to Latin-2 instead of UTF-8 to Latin-1.  I am not even totally sure that 
>>gnopernicus is converting from UTF-8 to Latin-8 now, before it does a 
>>braille table lookup, but it probably should be.
>>    
>>
>
>Gnpernicus calls g_utf8_get_char () for every char to display. If the
>result is bigger than a value (256), the undefined code is dispalyed,
>otherwise the entry in a table.
>  
>
I think instead of checking to see if the utf-8 character is more than 
one byte, you could use g_convert_with_fallback to convert the character 
to either Latin-1 or Latin-2, etc.
based on the current braille table.   So if the user were using a 
braille table that required Latin-2, you would use g_convert to convert 
the UTF-8 characters to Latin-2 before doing the braille table lookup.

http://developer.gnome.org/doc/API/2.0/glib/glib-Character-Set-Conversion.html#g-convert-with-fallback


regards

Bill

>  
>
>>If gnopernicus had a Latin-2 table that worked for your locale, then I 
>>think we could solve the problem by including the "character set" in the 
>>braille table, at the top, and making sure gnopernicus did the correct 
>>UTF-8 to 8-bit conversion for the given table before doing a character 
>>lookup.  From there on, the correct dots should be sent to BrlAPI.  
>>Remus, please correct me if I have this wrong.
>>
>>    
>>
>If the new "latin-2" table replaces the current table, it will be used
>by gnopernicus. Ther is no way to use both latin-1 and latin2 tables at
>the same time. 
>
>  
>
>>A better solution long-term would not be limited to an 8-bit braille 
>>table lookup, but this is the sort of thing 'gnome-braille' attempts to 
>>handle.
>>
>>    
>>
>
>
>Regards,
>Remus
>
>
>  
>



More information about the BRLTTY mailing list