Before discussing the alternatives below, I'd really like to know how
important the support for String8 really is. Are there really still
exchange servers around that support only String8 but not Unicode ?
For completeness, I'd like to add a forth option: namely fixing the
string type at compile time (like now but with default Unicode, a few
#ifdef's could be sufficient for everything else). Admittedly, this
might break the simultaneous use of older and newer exchanges servers.
The main advantages would be that the changes in source code would be
rather straight forward, and comes without a performance penalty.
The options listed below are certainly more flexible. I'm not sure
whether I understand all consequences of each alternative. However, I'd
suggest considering the following issues:
- Unicode-strings should be the default, only if these are not available
(because the server does not provide them), a fall-back to String8
should be done.
- Retrieving both, String8 and Unicode, string types from the server
(e.g. in GetPropsAll) seems to be a waste of resources, because
typically you want only one of both. I pointing this out, because
retrieving about 1600 contacts takes already about 76 seconds (more than
a minute) in our case; and I do not want to have this increased. So if,
option "3. API change", would mean retrieving both string types from the
server, that would not be good.
Cheers,
Alois
On 05/02/11 13:28, Julien Kerihuel wrote:
On Fri, 2011-04-15 at 07:45 +1000, Brad Hards wrote:
On Thursday 14 April 2011 23:55:43 Alois Schloegl wrote:
On 04/07/11 07:47, Milan Crha wrote:
and change also the requested values in functions mapidump_contact().
An it works just fine, the output is clean UTF8.
Because this change is likely to break the code in other parts, I
introduced the function GetPropsAllUnicode() and enabled it only for
mapidump_contacts (see attached patch against current SVN). The patch
contains also the changes to export e-mail addresses and distribution
lists, and improves the utf16->utf8 conversion (now using iconv) for the
e-mail addresses in the distribution lists.
Question for Milan and Alois: would you be happier if we always fetched
unicode (and gave you back UTF8)?
Fetching unicode only may break compat with older version of exchange.
I've been discussing with Milan today, we had in the end 3 different
options:
1. system-wide: add config parameters to the profile
2. session-wide: have a SetMapiConf() call with different options such
as WantUnicodeDefault etc.
3. API change
With regards to the discussion, an API change looks - as correctly
stated by Milan - the change which gets closer to the general OpenChange
policy: nothing hidden, it does what you ask for.
I'll review #269 from Milan after he updates the latest patch and apply
it to trunk.
Cheers,
Julien.
_______________________________________________
devel mailing list
devel@lists.openchange.org
http://mailman.openchange.org/listinfo/devel
_______________________________________________
devel mailing list
devel@lists.openchange.org
http://mailman.openchange.org/listinfo/devel