Re: [AD] Suggestion: an example program on unicode

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


Vincent PENQUERC'H <vpenquerch@xxxxxxxxxx> writes:
> I'm toying with the idea of making an example program to show how to use 
> the unicode functions. Do yo think it would be useful to add ?

What sort of things would you put in it? I'm all in favour of examples as 
long as they show things that are both widely useful and not totally 
obvious, but I don't think it is worth bothering with too much string 
manipulation, since that is mostly just a matter of putting 'u' in front of 
all your standard libc functions.

What might be interesting (and also useful as a test suite, since no current 
programs use anything other than UTF-8 format) would be a program that can 
run in any of the three text encodings. Show how to read strings from the 
outside world (for example commandline args), convert them into the internal 
format, do some basic stuff with them, and print them to the screen, and 
then also print out how that string is stored in memory as a list of hex 
values. That would help people to clearly see the differences between the 
three formats...


--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



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