On 10/20/2015 2:23 PM, John Dougrez-Lewis wrote:
How do I go about massaging the input & output into UTF-8 and fixed
width 16-bit Unicode?

Are there any good references on how to achieve this?

I can't speak for whether or not it's a good reference, but mod_authnz_ldap can do the "Request Input character encoding => UTF-8" part of what you described to convert usernames and passwords to UTF-8 before passing them to LDAP.

It uses the apr_xlate API along with a file specified by the AuthLDAPCharsetConfig directive to map the Accept-Language header to a character encoding. I believe the xlate API is using iconv under the hood, which can be its own source of problems if the server environment isn't set up properly.

I'd also be interested to hear if there are other ways for modules to handle character encodings, which is never an easy topic. I suppose ideally the protocol would dictate a required encoding that the client must use (via Content-Types), which simplifies things quite a bit.

Regards,

Paul Spangler
LabVIEW R&D
National Instruments

Reply via email to