[Kolab-devel] z-Push encoding problem

Bogomil Shopov shopov at kolabsys.com
Tue Jan 11 17:11:25 CET 2011


On Tuesday, January 11, 2011 05:32:08 pm Gunnar Wrobel wrote:
> Hi Bogomil,
> 
> thanks for working on the encoding stuff.
> 
> Zitat von Bogomil Shopov <shopov at kolabsys.com>:
> > Hey Alain, guys,
> > I discovered that there was a serious issue with encoding uing z-push
> > with Kolab. I have fixed it and commit the file into SVN.  (trunk)
> 
> The diff contains the new line
> 
> String::setDefaultCharset('UTF-8');

Here it is
> 
> that we discussed on Jabber.
> 
> While this might fix the problem for Kolab Zpush the same problem
> might occur in other scenarios where Kolab_Format is used as well. So
> I'd much rather fully understand and potentially fix the issue within
> Kolab_Format (in case it is really a problem of the library).
> 
> The only way I can reliably fix the issue - given the quality
> standards that apply to Kolab_Format - is by adding another unit test
> that reproduces the problem within the isolated library. That will
> ensure the same problem does not suddenly pop up again with Horde4 or
> at some later point in the future.
> 
> For that I would like to request three things:
> 
>   - a utf-8 encoded var_dump of the $kolabxml variable right after the
> String::setDefaultCharset('UTF-8'); you introduced
>   - a utf-8 encoded var_dump of the $kcontact variable right after the
> String::setDefaultCharset('UTF-8'); you introduced
>   - a utf-8 encoded var_dump of the $kcontact variable right after the
> String::setDefaultCharset('UTF-8'); you introduced but with the
> String::setDefaultCharset('UTF-8'); commented
> 
> This of course only for one contact that shows a problematic encoding.
> 
> Thanks!
> 
> Gunnar
> 
> > --
> > 
> > Bogomil "Bogo" Shopov
> > Senior Web Engineer
> > 
> > 
> > Kolab Systems AG
> > Zürich, Switzerland
> > 
> > e: shopov at kolabsys.com
> > t: +41 43 5016691 (ext. 2115 649)
> > w: http://kolabsys.com
> > b:http://talkweb.eu
> > 
> > pgp: E69A226A Bogomil "Bogo" Shopov
> 
> --
> Gunnar Wrobel
> Developer, Kolab Systems AG
> 
> e: wrobel at kolabsys.com
> t: +49 700 6245 0000
> w: http://www.kolabsys.com
> 
> pgp: 9703 43BE
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> 
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at kolab.org
> https://kolab.org/mailman/listinfo/kolab-devel

-- 

Bogomil "Bogo" Shopov
Senior Web Engineer


Kolab Systems AG
Zürich, Switzerland

e: shopov at kolabsys.com
t: +41 43 5016691 (ext. 2115 649)
w: http://kolabsys.com
b:http://talkweb.eu

pgp: E69A226A Bogomil "Bogo" Shopov
-------------- next part --------------
KOLAB XML
============================================
BEFORE STRING:::
------------------
<?xml version="1.0"?>
<contact version="1.0">
  <uid>20110111175940.2085781xeofrt3ks at legolas.home.edu</uid>
  <body></body>
  <categories></categories>
  <creation-date>2011-01-11T15:59:41Z</creation-date>
  <last-modification-date>2011-01-11T16:05:27Z</last-modification-date>
  <sensitivity>public</sensitivity>
  <product-id>Horde::Kolab</product-id>
  <name>
    <given-name>&#x43B;&#x435;&#x43B;&#x435;</given-name>
    <middle-names></middle-names>
    <last-name>&#x41A;&#x430;&#x43A;&#x430;&#x43A;&#x430;&#x43A;&#x430; &#x43B;&#x435; &#x433;</last-name>
    <full-name>&#x43B;&#x435;&#x43B;&#x435;  &#x41A;&#x430;&#x43A;&#x430;&#x43A;&#x430;&#x43A;&#x430;</full-name>
    <initials></initials>
    <prefix></prefix>
    <suffix></suffix>
  </name>
  <free-busy-url></free-busy-url>
  <organization></organization>
  <web-page></web-page>
  <im-address></im-address>
  <department></department>
  <office-location></office-location>
  <profession></profession>
  <job-title></job-title>
  <manager-name></manager-name>
  <assistant></assistant>
  <nick-name></nick-name>
  <spouse-name></spouse-name>
  <children></children>
  <language></language>
  <latitude></latitude>
  <longitude></longitude>
</contact>
"
------------------


AFTER STRING::
_________________________
the same
________________________
$kcontact


AFTER STRING::
----------------------
array(32) {
  ["uid"]=>
  string(48) "20110111175940.2085781xeofrt3ks at legolas.home.edu"
  ["body"]=>
  string(0) ""
  ["categories"]=>
  string(0) ""
  ["creation-date"]=>
  int(1294761581)
  ["last-modification-date"]=>
  int(1294761927)
  ["sensitivity"]=>
  string(6) "public"
  ["product-id"]=>
  string(12) "Horde::Kolab"
  ["given-name"]=>
  string(8) "????"
  ["middle-names"]=>
  string(0) ""
  ["last-name"]=>
  string(24) "???????? ?? ?"
  ["full-name"]=>
  string(26) "????  ????????"
  ["initials"]=>
  string(0) ""
  ["prefix"]=>
  string(0) ""
  ["suffix"]=>
  string(0) ""
  ["free-busy-url"]=>
  string(0) ""
  ["organization"]=>
  string(0) ""
  ["web-page"]=>
  string(0) ""
  ["im-address"]=>
  string(0) ""
  ["department"]=>
  string(0) ""
  ["office-location"]=>
  string(0) ""
  ["profession"]=>
  string(0) ""
  ["job-title"]=>
  string(0) ""
  ["manager-name"]=>
  string(0) ""
  ["assistant"]=>
  string(0) ""
  ["nick-name"]=>
  string(0) ""
  ["spouse-name"]=>
  string(0) ""
  ["children"]=>
  string(0) ""
  ["language"]=>
  string(0) ""
  ["latitude"]=>
  string(0) ""
  ["longitude"]=>
  string(0) ""
  ["emails"]=>
  string(0) ""
  ["__type"]=>
  string(6) "Object"
}
----------------------

WITHOUT STRING::
----------------
array(32) {
  ["uid"]=>
  string(48) "20110111175940.2085781xeofrt3ks at legolas.home.edu"
  ["body"]=>
  string(0) ""
  ["categories"]=>
  string(0) ""
  ["creation-date"]=>
  int(1294761581)
  ["last-modification-date"]=>
  int(1294762139)
  ["sensitivity"]=>
  string(6) "public"
  ["product-id"]=>
  string(12) "Horde::Kolab"
  ["given-name"]=>
  string(4) "????"
  ["middle-names"]=>
  string(0) ""
  ["last-name"]=>
  string(14) "???????? ?? ??"
  ["full-name"]=>
  string(14) "????  ????????"
  ["initials"]=>
  string(0) ""
  ["prefix"]=>
  string(0) ""
  ["suffix"]=>
  string(0) ""
  ["free-busy-url"]=>
  string(0) ""
  ["organization"]=>
  string(0) ""
  ["web-page"]=>
  string(0) ""
  ["im-address"]=>
  string(0) ""
  ["department"]=>
  string(0) ""
  ["office-location"]=>
  string(0) ""
  ["profession"]=>
  string(0) ""
  ["job-title"]=>
  string(0) ""
  ["manager-name"]=>
  string(0) ""
  ["assistant"]=>
  string(0) ""
  ["nick-name"]=>
  string(0) ""
  ["spouse-name"]=>
  string(0) ""
  ["children"]=>
  string(0) ""
  ["language"]=>
  string(0) ""
  ["latitude"]=>
  string(0) ""
  ["longitude"]=>
  string(0) ""
  ["emails"]=>
  string(0) ""
  ["__type"]=>
  string(6) "Object"
}

----------------


More information about the devel mailing list