[openbeos] Re: StyledEdit news of various interest

Although you couldn't add a new character set without providing some code
to perform the translation, there are some other modifications that you could
make without needing to change the code.  For example, providing new
aliases to existing character sets.  Or providing a mime type for a character
set that previously didn't have one.

Well, maybe some of my suggestion comes from my annoyance at having to
code in the construction of the character set objects as well.  The character
set objects don't themselves have the code for doing the conversion, (maybe
they should?) so they are just a bunch of int and char * fields.  Maybe a 
little dabbling in initializers would simplify things.  I'll try to take another
look when I get a chance.

BTW, we don't have any libtextencoding.so code in obos yet.  And I'm
pretty sure the character set code should go in there instead of in 
libtranslation.so.  I think this lib implements only two exported functions:

00000a80 T convert_to_utf8(unsigned long, char const *, long *, char *, long *, 
long *, char)
00000e14 T convert_from_utf8(unsigned long, char const *, long *, char *, long 
*, long *, char)

Hmm... on the other hand I suppose it could cause a problem to introduce
classes into libtextencoding.so because C code could link to it. (right?)
Does this mean we should put the code somewhere else, restructure it to
use C, or perhaps make a new lib for it? (libcharacterset.so?)

BTW, I'm still not clear on whether or not we can use libiconv.so.  The
iconv package has a lib called libcharset.so also.

Andrew

"Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx> wrote:
> On Thu, 24 Jul 2003 04:12:35 +0200 CEST "Axel Dörfler" <axeld@pinc-
> software.de> wrote:
> > Why not just have it hard-coded in libtranslation.so? Or is there any 
> > other way of adding other character sets without replacing that 
> > library?
> 
> Good point.
> 
> > It could build that table on compilation time automatically. Where is 
> > the point in having that info in a text file somewhere?
> 
> Right, unless we intend to add something like encoding add-ons, this 
> makes most sense.
> 
> CU, Ingo
> 


Other related posts: