On 3 Mar 2011, at 16:52, Ben Noordhuis wrote: > On Thu, Mar 3, 2011 at 17:12, Sam Carleton <scarle...@miltonstreet.com> 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 http://www.webthing.com/~nick/cv.html