Hi List, Developers and users following trunk may have noticed changes among last weeks related to UTF-8 strings support in OpenChange. So far, I have introduce a patch for UTF-8 to UTF-16 string conversions which means users can now send UTF-8 strings for PT_UNICODE properties.
Beside is a short follow-up of this problem. The other part of the patch is related to PT_STRING8 strings. These strings are multi-bytes character strings encoded using an external charset. If no codepage is supplied, then strings have to be encoded using the default user's language. However OpenChange was using them as ASCII strings, which resulted in non-valid chars being displayed and forbidding users from using UTF-8 strings for these properties. Furthermore we had hardcoded codepage/lcid in mapiprofile (defined to English) which was wrong anyway. I've introduced a large patch this morning that addresses part of the problem and provide preliminary fixes for the PT_STRING8 problem. I have replaced the whole codepage/lcid implementation in OpenChange with an auto-generated parser and mapiprofile now relies on LC_CTYPE environment variable to automatically adjust associated codepage/lcid used in libmapi rather than default hardcoded strings. I'll now be working on the last part which is PT_STRING8 support. I'll presumably have to introduce a MIME parser in OpenChange (based over iconv) to detect invalid PT_STRING8 strings supplied by user. For example a string with Russian, Chinese and Japanese strings can't be stored within a PT_STRING8 property because they require 3 different encoding to be used. However such string would fit in a PT_UNICODE one. I'll also have to fix some of libmapi internals and look for CodePage properties the user may have supplied to SetProps or asked in GetProps and adjust conversion using this data (or fallback to system codepage if not available). For users/developers this forthcoming patch shouldn't introduce any API changes and will let them specify UTF-8 strings in input. Cheers, Julien. Julien Kerihuel [email protected] OpenChange Project Manager GPG Fingerprint: 0B55 783D A781 6329 108A B609 7EF6 FE11 A35F 1F79
signature.asc
Description: This is a digitally signed message part
_______________________________________________ devel mailing list [email protected] http://mailman.openchange.org/listinfo/devel
