Re: [AD] al_font_textprintf() and uvszprintf()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thursday 30 October 2008, Peter Wang wrote:
> On 2008-10-29, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On Wednesday 29 October 2008, Peter Wang wrote:
> > > > > However: what are the file names we get back from Mac OS X, say if
> > > > > we are scanning a directory with readdir()?  Will they come back in
> > > > > NFD, and will that trip up users?
> > >
> > > (the answer to this is: yes, they do come back in NFD)
> > >
> > > > I hope not. How do allegro's unicode conversions behave?
> > >
> > > IIRC Allegro's routines don't handle decomposed characters at all.
> >
> > It has to somehow "just work". I'm not sure how we can make it "just
> > work".
>
> I think the fshooks/path APIs should perform minimal interpretation of
> any strings it gets.  Apart from the drive and directory separators,
> they should just treat paths as opaque byte strings.  It'll be the
> user's responsibility to convert that to some other encoding, e.g. to
> display it using the font addon.  This is more likely to "just work"
> than any amount of string mangling can manage (cf. Allegro 4 lopping
> off accents on filenames because it thinks filesystems only deal in
> ASCII).

Yeah ok. the parsing itself tries to use the allegro unicode api to find the 
right char, and shouldn't mangle anything so long as allegro doesn't. But then 
it has to know what format the incoming string is, so it can create the right 
type when parsing and spiting in the path api.

Of course, those al_path_ functions that directly call fshook api functions 
might want to detect the proper system encoding.. Or the path api ONLY deals 
with os native fs encoding.. I dunno. I'm tired.

> Peter
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




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