[#6457] utf-8 error on attendee's addressbook search
Summary utf-8 error on attendee's addressbook search
Queue Kronolith
Queue Version 2.2-RC2
Type Bug
State Stalled
Priority 1. Low
Owners
Requester szimszon (at) oregpreshaz (dot) eu
Created 03/17/2008 (55 days ago)
Due
Updated 04/25/2008 (16 days ago)
Assigned 04/24/2008 (17 days ago)
Resolved 04/25/2008 (16 days ago)
Attachments contact.png Download
new_mail_ok.png Download
attendee_wrong.png Download
attendee2_wrong.png Download
Milestone
Patch

History
04/25/2008 szimszon (at) oregpreshaz (dot) eu Comment #24 Reply to this comment
> Well, that makes it exactly the same as the IMP code, so, we need
> more information from you on why it doesn't work on your system.

Who can I help?

Who could I make the problem more verbose? Could you send me a code with more logging? What shall I do?
04/25/2008 Chuck Hagenbuch Comment #23
State ⇒ Stalled
Taken from Chuck Hagenbuch
Reply to this comment
Well, that makes it exactly the same as the IMP code, so, we need more information from you on why it doesn't work on your system.
04/25/2008 szimszon (at) oregpreshaz (dot) eu Comment #22 Reply to this comment
> This will fix it:
> http://lists.horde.org/archives/cvs/Week-of-Mon-20080421/077735.html

It doesn't work for me :(

I downloaded the "http://cvs.horde.org/co.php?r=1.1.2.2&p=1&f=kronolith%2Flib%2FJSON.php" and replaced the JSON.php in /kronolith/lib but the result is the same as previous.

I deleted my browser's cache restarted the apache deleted the horde cache files... :(
04/24/2008 Chuck Hagenbuch Comment #21
State ⇒ Resolved
Reply to this comment
04/24/2008 Chuck Hagenbuch Comment #20
State ⇒ Assigned
Assigned to Chuck Hagenbuch
Reply to this comment
The other way around.
04/24/2008 szimszon (at) oregpreshaz (dot) eu Comment #19 Reply to this comment
> It's a symptom of the same PHP problem, not the same Horde problem.
> Address search uses JSON; you probably need a newer PHP json module.

But why is it working elsewhere on my system? Look at new_mail_ok.png

Or only kronolith use json for address expansion/search and IMP not?
04/23/2008 Chuck Hagenbuch Comment #18
State ⇒ Duplicate
Reply to this comment
It's a symptom of the same PHP problem, not the same Horde problem. Address search uses JSON; you probably need a newer PHP json module.
04/08/2008 szimszon (at) oregpreshaz (dot) eu Comment #17 Reply to this comment
> Eh, bug 5955. :)
I have no problem with Subject's in DIMP :-o Everything is fine.
04/07/2008 Jan Schneider Comment #16 Reply to this comment
> This is the bug #6457... :)

Eh, bug 5955. :)
04/07/2008 szimszon (at) oregpreshaz (dot) eu Comment #15 Reply to this comment
> See also bug 6457 which might be
> another symptom of the same root problem.
This is the bug #6457... :)
04/07/2008 szimszon (at) oregpreshaz (dot) eu Comment #14 Reply to this comment
> Which PHP version do you use? See also bug 6457 which might be
> another symptom of the same root problem.
Package: php5
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 20
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: all
Version: 5.2.0-8+etch10
04/04/2008 Jan Schneider Queue ⇒ Kronolith
 
04/04/2008 Jan Schneider Comment #13 Reply to this comment
Which PHP version do you use? See also bug 6457 which might be another symptom of the same root problem.
03/20/2008 szimszon (at) oregpreshaz (dot) eu Comment #12 Reply to this comment
> Do you have the json PHP extension installed by chance? We seem to
> use it in IMP if it's available, but not in Kronolith. This could
> make the difference.

I use this extension:

dpkg -s php5-json
Package: php5-json
Status: install ok installed
Installed-Size: 60
Maintainer: Pierre Habouzit <madcoder@debian.org>
Architecture: i386
Source: php-json-ext
Version: 1.2.1-3.2

extension=json.so
03/20/2008 Jan Schneider Comment #11 Reply to this comment
Do you have the json PHP extension installed by chance? We seem to use it in IMP if it's available, but not in Kronolith. This could make the difference.
03/20/2008 Jan Schneider Comment #10 Reply to this comment
> And in IMP's compose.php:
>
> $js_code[] = 'var identities = ' .
> IMP_Serialize_JSON::encode(String::convertCharset($js_ident,
> NLS::getCharset()), 'utf-8');

Nice catch. It was actually the line in IMP that was wrong.
03/20/2008 szimszon (at) oregpreshaz (dot) eu Comment #9 Reply to this comment
My SQL settings are:

$conf['sql']['persistent'] = true;
$conf['sql']['username'] = 'xxxxxxx';
$conf['sql']['password'] = '**********';
$conf['sql']['hostspec'] = 'localhost';
$conf['sql']['port'] = 0;
$conf['sql']['protocol'] = 'tcp';
$conf['sql']['database'] = 'hordewebmail2';
$conf['sql']['charset'] = 'utf-8';
$conf['sql']['phptype'] = 'pgsql';
03/20/2008 szimszon (at) oregpreshaz (dot) eu Comment #8 Reply to this comment
Sorry I have not much time these days... :(

I found some interesting line but it seems to have no effect to my problem.

In kronolith's imle.php I found the line:
  echo KRONOLITH_Serialize_JSON::encode(String::convertCharset($result, NLS::getCharset(), 'utf-8'));

(String::convertCharset($result, NLS::getCharset(), 'utf-8' -->)<-- );

And in IMP's compose.php:

$js_code[] = 'var identities = ' . IMP_Serialize_JSON::encode(String::convertCharset($js_ident, NLS::getCharset()), 'utf-8');

(String::convertCharset($js_ident, NLS::getCharset()  -->)<--  , 'utf-8');

In kronolith's code, the 'utf-8' is the argument of String::convertCharset but not in IMP's code...

Anyway change it in kronolith doesn't do the trick :(


03/17/2008 Jan Schneider Comment #7
State ⇒ Feedback
Reply to this comment
If you know your way around charsets, you should start in kronolith/imple.php where the conversion happens from the turba api to json (javascript) code.
03/17/2008 szimszon (at) oregpreshaz (dot) eu Comment #6 Reply to this comment
> Works fine here
I don't know if it matters, I have pgsql database backend.

How can I trace the problem back?
03/17/2008 Jan Schneider Comment #5 Reply to this comment
Works fine here
03/17/2008 szimszon (at) oregpreshaz (dot) eu Comment #4
New Attachment: attendee2_wrong.png Download
Reply to this comment
> Attendee wrong: attendee2_wrong.png
03/17/2008 szimszon (at) oregpreshaz (dot) eu Comment #3
New Attachment: attendee_wrong.png Download
Reply to this comment
> Attendee expand wrong: attendee_wrong.png
03/17/2008 szimszon (at) oregpreshaz (dot) eu Comment #2
New Attachment: new_mail_ok.png Download
Reply to this comment
> If I make a new e-mail it's OK: new_mail_ok.png
03/17/2008 szimszon (at) oregpreshaz (dot) eu Comment #1
New Attachment: contact.png Download
Patch ⇒
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Summary ⇒ utf-8 error on attendee's addressbook search
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
I wonder if somebody could help me...

I have a contact named "Árvízt&#369;r&#337; Tükörfúrógép".

Everywhere looks ok but if I make a new event and I assign attendees to it.
The addressbook autoexpand looks bad.

My contact info: contact.png
If I make a new e-mail it's OK: new_mail_ok.png
Attendee expand wrong: attendee_wrong.png
Attendee wrong: attendee2_wrong.png