Forum for iCal4OL, Print4OL and ICS4OL

Exchange of experiences / Erfahrungsaustausch / Get Help

You are not logged in.


Verkauf von iCal4OL an Neukunden ist eingestellt! Keine Demo mehr verfügbar..
Diese Seite ist ausschliesslich für Kunden.
The selling of iCal4OL has ended! No trial available anymore..
This site is exclusively for customers.

iCal4OL Version 2.18.0 is now available. See Announcements / Ankündigungen

#1 2010-09-25 15:24:37

Registered: 2007-11-25
Posts: 1524

iCal4OL 2.9.18 (Support for e.g. Chinese Windows OS since 2.9.16)

- Support for Citadel 7.84 added (notes can be downloaded, but not uploaded)
- Some bug fixes and improvements, see Changelog (English/German)

Some more options implemented:
[X] Interpret category as color label.. for Outlook 2003 (Options - RDO/Misc.)
[X] do NOT add attendees+stati into event descriptions (Options - Startup) - do not use this for CalDAV, if you use Darwin CalendarServer or word "organizer" in field "UserID"!

Since 2.9.16: Correct handling of non English/Latin based OS Languages, like Chinese Win OS.

Tab "Options", sub-tab "Import Feed":

[ 6] Import UTF-8 decode .....needed for non English/Latin OS!
This will read, write, receive and send all data as Byte Array (e.g. Dim bArray() as Byte).
UTF-8 encoding/decoding is done by declared Functions "WideCharToMultiByte" and "MultiByteToWideChar"!
Chinese OS can't handle CHR() codes between Ansi 128 to 255! Most of those CHR() are invalid - therefore it's not possible to store an UTF-8 string in a VB6-String (BSTR) directly.
And there is an issue with strconv() on chinese OS. This function does not support UNICODE 4.0 - therefore UTF-8 three-bytes characters > 0xE80000 can't be mapped into a string. Most VB6 code example in the internet do not take in account of this (Chinese) OS limitations.

[ 5] Import UTF-8 decode
This will use the default LCID=2048 for strconv(). It's needed for e.g. English OS with Language set to Cyrillic or Thai (systen settings - regions and countries - enhanced).
By default strconv() is using the user LCID and not the system LCID - therefore the UTF-8 encoding/decoding can't work correctly, if not [5] is used.

[ 3] Import UTF-8 decode
This option only works with WinHTTP.dll (check on tab "Options" sub-tab "HTTP_DLL" and deactivate [ ] Use WinInet.dll...)
With this setting WinHTTP.dll is doing the UTF-8 encoding/decoding. This only affects HTTP(S), and not Import/Export a ICAL file (*.ics)

==> If some characters are showing up as "?" after a sync, then it's time to try out those settings!
        Please remember, that only newer items are getting synced.
        If you want to download again from a server, make a [Folder Sync Reset] e.g. on tab "1. How", delete all items in Outlook AND empty the "deleted items" folder, too!

(Restriction of those settings: the inbuild CalDAV-Server (not the Client!) to share a Outlook Calendar with a Sunbird/Lightning-User, is only supported on English/Latin OS)

VB6 code example to correctly read a UTF-8 file and convert it to Unicode (works on Chinese Windows, too):


Private Declare Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByRef lpMultiByteStr As Any, _
    ByVal cchMultiByte As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long
Private Const CP_UTF8 = 65001

Public Function DateiLesenBIN(Dateiname As String) As String
    Dim DateiNr As Integer, bArray() As Byte, i As Long, TopIndex As Long, TStr As String
    On Local Error GoTo Fehler
    DateiNr = FreeFile
    Open Dateiname For Binary Access Read Shared As DateiNr
    ReDim bArray(LOF(DateiNr) - 1)
    Get #DateiNr, 1, bArray
    TopIndex = UBound(bArray) + 1
    i = TopIndex * 2
    TStr = String$(i, vbNullChar)
    i = MultiByteToWideChar(CP_UTF8, 0, bArray(0), TopIndex, StrPtr(TStr), i)
    If i Then DateiLesenBIN = Left$(TStr, i)
    Close DateiNr
    Exit Function

    MsgBox Dateiname & vbCrLf & Err.Number & " " & Err.Description & " " & i & "/" & TopIndex
    Close DateiNr
End Function

Last edited by Roland (2010-10-19 17:37:19)



Board footer