Summary: | import of vcard 2.1 with CHARSET set to UTF-8 are garbled | ||
---|---|---|---|
Product: | [Unmaintained] kab3 | Reporter: | Urs Roesch <urs> |
Component: | general | Assignee: | Tobias Koenig <tokoe> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | guitar, michal, tuju, wstephenson |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Sample Japanese vCard in UTF-8 |
Description
Urs Roesch
2005-02-07 18:06:08 UTC
Created attachment 9471 [details]
Sample Japanese vCard in UTF-8
The copy & past example in the bug description will not work correctly use the
attached file for testing confirmation instead.
Same with my kaddressbook Kaddressbook Version: 3.3.1 (KDE 3.3.2, (3.1)) Operating System: Linux (i686) release 2.6.10-p4-skas3-v7 Namely, vCard v2.1 received from Siemens cx65 with UTF8-encoded Russian characters gets imported as containing only '?' signs in all such text fields *except* for FN. In a dialog it's viewed fine in the preview pane (the text viewed represents what becomes that same FN later). Anatoly Ershov ershov <> nice.ru Same with my kaddressbook Kaddressbook Version: 3.3.2 (KDE 3.3.2) Operating System: Linux (i686) 2.6.11.6 (Debian testing) Importing vCard v2.1 from Siemens SX1 makes in imported contact some japanese characters. My source vCard file is UTF-8 encoded. I am using polish language. The same happens when importing v3.0 cards: the special characters are corrupted importing from a local *.vcf file, no matter if the file is in UTF-8 or ISO-8859-2 charset. Nevertheless, adding the *.vcf file as an additional addressbook solves the problem: it correctly import the special characters, no matter if the file is in UTF-8 or ISO-8859-2 charset! Same for me, when loading vCard over GroupDav, with fields in charset:UTF-8. AFAI can trace this, it's result of patch from http://bugs.kde.org/show_bug.cgi?id=72380 Two calls to ``QString::fromUtf8( value.ascii() )'' seems to be superfluous. It appears to me like the data is getting de-coded (through some UTF8-to-internal-SQtring-format) twice. Or, in case it's UTF8 that makes internal format of QString, once. Anyway, one time too much. Reason of my belief: when i used data UTF8-encoded, but removed the ``charset:utf-8'' bit, it shows up just OK. My troubles are related to this bug. KAddressBook 3.5.6 is using UTF-8 for vCards. Unfortunately the option ;CHARSET=UTF-8 is not stored in relevant fields. This is not in line with vCard 2.1 specification but mainly, this not allow sharing vCards with UTF-8 chars with other applications / devices, as these characters are after transfer wrong. Solution is to use ;CHARSET=UTF-8 option for storing fields with UTF-8 encoding and to read correctly fields with ;CHARSET=UTF-8 yeah, can confirm this for 3.5.7 *** Bug 98165 has been marked as a duplicate of this bug. *** SVN commit 758100 by mkoller: BUG: 98790 Correctly handle CHARSET attribute in vcard parsing and handle given string as plain C-byte array M +2 -2 vcardformatplugin.cpp M +1 -1 vcardparser/testread.cpp M +25 -11 vcardparser/vcardparser.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=758100 The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product. |