httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: Converting a 16-bit string to 8-bit?
Date Thu, 03 Mar 2011 17:22:29 GMT

On 3 Mar 2011, at 16:52, Ben Noordhuis wrote:

> On Thu, Mar 3, 2011 at 17:12, Sam Carleton <> wrote:
>> I am looking at using a 3rd party library that only operates on 16-bit
>> strings.  Is there a built in functions to convert the strings back to
>> 8-bit?  I am currenly on Windows and Windows has built in functions I could
>> use, I would prefer to use Apache functions if they exist.
> Sam, you want either apr_xlate.h or apr-iconv / native iconv.

apr_xlate would be the appropriate abstraction for cross-platform support,
if it meets your needs.  If not, you'd need an external library.

You might not need to do anything at all:

(1) You could send data out in 16-bit encoding if you send it with
an appropriate charset parameter in the Content-type header.
(2) If (1) is not an option, an existing module like mod_charset
might be suitable to do the conversion for you.

Nick Kew

Available for work, contract or permanent

View raw message