Re: [hatari-devel] GEMDOS filename handling

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On lauantai 16 elokuu 2014, Thomas Huth wrote:
> NAK, again, this is really the wrong way to go. I think we really
> should rather support (western-style) UTF-8 strings in the GUI instead.
> I did something similar for Ballerburg SDL, too, see:
> 
> http://git.tuxfamily.org/baller/baller.git/?p=baller/baller.git;a=blobdif
> f;f=src/sdlgui.c;h=185fbce139cea6d82b419a9f422da33fcdfa2d5a;hp=e25dcaaf21
> 658c87a0c442596d3f4d3c5f45f98b;hb=fce95fd6a8225038d8f17554284a6db4ff571ca
> 3;hpb=ad6a2a99bac840403793baff42f4a88cba9aa30c

This differs from what I proposed only in one relevant aspect,
Using latin1 instead of Atari encoding for font indexing.  Doing
conversion inline like in your code is more efficient also.


> > However, SDL GUI font doesn't use Atari character order, but
> > something else.
> 
> It's simply a latin1 codepage. Should be enough for the current set of
> Hatari users, I suppose.

I haven't really compared latin1 and Atari codepages, but I guess it
could cover Hatari user base character needs slightly better than
Atari code page which wastes part of the space for non-letters.
There are few characters missing though:
http://en.wikipedia.org/wiki/ISO/IEC_8859-1#Languages_commonly_supported_but_with_incomplete_coverage

And as the font is already in latin1 and you have code for
conversion, that makes things simper too.

Note that you need to add also filename -> UTF-8 conversion
for things to work properly for OS versions that don't mount
file systems with UTF-8 (older Linux & Windows).  You can
probably re-use Max code for that, as it already handles
host <-> Atari and UTF-8 <-> Atari conversions, you just need
to shortcircuit it a bit.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/