apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: apr unicode-16 lib.
Date Wed, 13 Jun 2001 20:01:43 GMT
On Wed, Jun 13, 2001 at 05:35:01PM +0200, Luke Kenneth Casson Leighton wrote:
> On Wed, Jun 13, 2001 at 09:57:41AM -0500, William A. Rowe, Jr. wrote:
> > Then let's not start adding things willy nilly.  We have apr_iconv due to
> > portability, let's build upon that.  It should be across character sets, so
> > we can handle this stuff in an opaque manner.


> i don't mind.  as long as there's something that can be used
> as the basis to write an APR-based SMB server, and it's capable
> of handling ucs2 in intel-native format off-the-wire.

The apr_iconv stuff should be able to do UCS-2 -> UTF-8 conversion. If it
can't, then it is useless :-)

[ I'm guessing it already can; in any case, the API is there for this ]

[ hmm. apr/include/arch/unix/i18n.h has some conversion code; no idea why ]

> [i can auto-generate some code to do the conversion, it
> doesn't matter what the internal format is in, ultimately, as
> long as no information is lost,

UTF-8 is a lossless encoding of UCS-2 (or UCS-4).

> and there's a secondary
> consideration to speed.  samba is full of code that
> converts ucs2 to ascii by dropping the high byte.]

That is way broken :-)


Greg Stein, http://www.lyra.org/

View raw message