Hi,

Am 24.09.2004 um 03:06 schrieb Joe Schaefer:

Boris Zentner <[EMAIL PROTECTED]> writes:

In my real case, I get the data from libapreq2 in raw format and my
desire is to convert some of them inplace to utf8. Then the rest of my
application can rely on libapreq's functions.

That will not work, because libapreq2 doesn't track charset encodings. You should subclass the methods your application uses and do the conversions in the subclass.


Hmm, I think my point is not clear, I provide a $apr object to other modules out of my control. The data is stored in utf8 ( mostly ). I do not want any dataconversion on the libapr2 or mod_perl side, I just want a utf8 flag back if I put it in with the flag. Other wise the data is converted a second time and that is wrong. If APR::Table drops the information, I can not say if it is a valid string anymore.


We could help make this a little easier by having the perl glue
convert utf8-strings to byte-strings before storing them in an
apr_table_t, but you'd still be responsible for decoding the bytes
on a fetch.

It makes only sense the other way around. A $apr->param('parameter'); must provide a valid object. Otherwise, how do I know that this object needs a conversion?


--
Boris


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to