Summary | Searching for groups with non ascii chars |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | sebastian.radish (at) gmx (dot) de |
Created | 10/20/2010 (5370 days ago) |
Due | |
Updated | 10/21/2010 (5369 days ago) |
Assigned | 10/21/2010 (5369 days ago) |
Resolved | 10/21/2010 (5369 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
MFB: Need charset conversion here too (
Bug #9323).http://git.horde.org/diff.php/framework/DataTree/DataTree/sql.php?rt=horde-git&r1=954f50d7ce9c24b91fb309db0935853a7c31c555&r2=678ebe04a2932a138e20a764ec37787df99cab25
State ⇒ Resolved
Need charset conversion here too (
Bug #9323).http://cvs.horde.org/diff.php/framework/DataTree/DataTree/sql.php?rt=horde&r1=1.156.2.45&r2=1.156.2.46&ty=u
Unfortunatly, ->getGroupId($group) also failed till I added a similar
line to the "_getId" function.
My diff looks like this know:
----------------------------------------------
--- a/horde/lib/Horde/DataTree/sql.php 2010-04-28 15:39:38.000000000 +0200
+++ b/horde/lib/Horde/DataTree/sql.php 2010-10-21 19:05:31.000000000 +0200
@@ -391,6 +391,7 @@
$query = 'SELECT datatree_id FROM ' . $this->_params['table'] .
' WHERE group_uid = ? AND datatree_name = ? AND
datatree_parents = ?';
+ $object_name = String::convertCharset($object_name,
NLS::getCharset(), $this->_params['charset']);
$object_names = explode(':', $object_name);
$object_parents = '';
foreach ($object_names as $name) {
@@ -422,6 +423,7 @@
. ' AND datatree_parents = ?';
$ids = array();
+ $name = String::convertCharset($name, NLS::getCharset(),
$this->_params['charset']);
$parts = explode(':', $name);
foreach ($parts as $part) {
$result = $this->_db->getOne($query,
array($this->_params['group'], $part, count($ids) ? ':' . implode(':',
$ids) : ''));
State ⇒ Feedback
Assigned to Jan Schneider
Convert charset when checking for existance (
Bug #9323).http://cvs.horde.org/diff.php/framework/DataTree/DataTree/sql.php?rt=horde&r1=1.156.2.44&r2=1.156.2.45&ty=u
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Searching for groups with non ascii chars
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
I'm using a MySQL database (charset is set to utf-8). The group system
uses the DataTree backend.
I want to try if a group (with non ascii chars) exists with something
like this:
Group::singleton()->exits($group);
However, if the groups are not cached, it only works if I do this first:
$group = String::convertCharset($group,
$GLOBALS['_HORDE_STRING_CHARSET'], 'utf-8');
$GLOBALS['_HORDE_STRING_CHARSET'] seems to be 'iso8859-1'.