<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Charset trouble when saving page names in db backend</title> 
  <pubDate>Fri, 10 Apr 2026 17:52:45 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7805</link> 
  <atom:link rel="self" type="application/rss+xml" title="Charset trouble when saving page names in db backend" href="https://bugs.horde.org/ticket/7805/rss" /> 
  <description>Charset trouble when saving page names in db backend</description> 
 
   
   
  <item> 
   <title>Horde 3.3.3-cvs

Wicked 1.0-cvs



When I create a page with</title> 
   <description>Horde 3.3.3-cvs

Wicked 1.0-cvs



When I create a page with special characters in the name, like &quot;Circunstância&quot;, the page is saved in my database as &quot;CircunstÃ¢ncia&quot;.



It would be better to get the names saved exactly as they were wrote (like in Turba), due to future migrations and even manual query activities.



If I change line 616 of wicked/lib/Driver/sql.php from &#039;$pagename,&#039; to:



&#039;String::convertCharset($pagename, NLS::getCharset(), $this-&gt;getCharset()),&#039;



Then the page name is saved ok in my db backend.



But then when displaying the page name in the application I get:



&#039;Circunst&amp;#65533;ncia&#039;



Thanks</description> 
   <pubDate>Wed, 24 Dec 2008 19:28:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51446</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/wicked/docs/CHANGES?rt=horde&amp;r1=1.88&amp;r2=1.89&amp;ty=u
http://cvs.horde.org/diff.php/wicked/lib/Driver/sql.php?rt=horde&amp;r1=1.80&amp;r2=1.81&amp;ty=u</description> 
   <pubDate>Sun, 28 Dec 2008 04:45:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51458</link> 
  </item> 
   
  <item> 
   <title>A bunch more convertCharset calls were also needed. Should b</title> 
   <description>A bunch more convertCharset calls were also needed. Should be fixed now.</description> 
   <pubDate>Sun, 28 Dec 2008 04:46:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51459</link> 
  </item> 
   
  <item> 
   <title>&gt; A bunch more convertCharset calls were also needed. Should</title> 
   <description>&gt; A bunch more convertCharset calls were also needed. Should be fixed now.



Seems to be working great! But the application is unable to identify a page with special characters in the name as &quot;already created&quot;, thus making the link to it red (as if the page didn&#039;t exist), although you can open the page normally.



</description> 
   <pubDate>Sun, 28 Dec 2008 18:32:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51461</link> 
  </item> 
   
  <item> 
   <title>Are these pages that were created before the patch, or after</title> 
   <description>Are these pages that were created before the patch, or after?</description> 
   <pubDate>Sun, 28 Dec 2008 18:49:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51462</link> 
  </item> 
   
  <item> 
   <title>&gt; Are these pages that were created before the patch, or aft</title> 
   <description>&gt; Are these pages that were created before the patch, or after?



I tested in both situations. New pages are also not identified as already created.



PS: Pages without any special chars (created before or afeter the patch) are recognized just fine.</description> 
   <pubDate>Sun, 28 Dec 2008 18:53:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51463</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Are these pages that were created before the patch, or af</title> 
   <description>&gt;&gt; Are these pages that were created before the patch, or after?

&gt;

&gt; I tested in both situations. New pages are also not identified as 

&gt; already created.

&gt;

&gt; PS: Pages without any special chars (created before or afeter the 

&gt; patch) are recognized just fine.



Oh, and I forgot to mention. I have renamed in the db the pages created before the patches, so they can still be opened. It&#039;s working. The trouble are the &#039;red&#039; links.</description> 
   <pubDate>Sun, 28 Dec 2008 19:48:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51464</link> 
  </item> 
   
  <item> 
   <title>What&#039;s an example of something you&#039;re using as a page name? </title> 
   <description>What&#039;s an example of something you&#039;re using as a page name? I&#039;m not getting Text_Wiki to even identify page names with unicode characters in them.</description> 
   <pubDate>Sun, 28 Dec 2008 20:38:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51465</link> 
  </item> 
   
  <item> 
   <title>&gt; What&#039;s an example of something you&#039;re using as a page name</title> 
   <description>&gt; What&#039;s an example of something you&#039;re using as a page name? I&#039;m not 

&gt; getting Text_Wiki to even identify page names with unicode characters 

&gt; in them.



&#039;Tributário&#039;, for example. I&#039;m attaching the screenshots in order to clarify.



This is my wikihome. Both &#039;Penal&#039; and &#039;Tributário&#039; pages exist, but the link for &#039;Tributário&#039; is still red (although it works if clicked):



http://img136.imageshack.us/img136/8862/wikihomefp4.jpg



This is the &#039;Tributário&#039; page. After the patch, the name is displayed correctly and also in the db the name is correctly saved:



http://img171.imageshack.us/img171/7743/tributarioez1.jpg  (page screenshot)



http://img525.imageshack.us/img525/4858/dbny6.jpg  (Database screenshot)



And when searching for &#039;Tributário&#039;, it works flawlessly, but still there&#039;s the same red coloured link problem in the results page:



http://img230.imageshack.us/img230/7728/searchue3.jpg

</description> 
   <pubDate>Sun, 28 Dec 2008 21:23:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51466</link> 
  </item> 
   
  <item> 
   <title>The trouble is $page variable in Wikilink.php returns the pa</title> 
   <description>The trouble is $page variable in Wikilink.php returns the page name just fine: &#039;Tributário&#039;, but the $list array, which is pulled from $this-&gt;getConf(&#039;pages&#039;) returns the page name as &#039;Tribut&amp;#65533;rio&#039;, thus making the test &quot;$exists = in_array($page, $list)&quot; fail (line 76 of Wikilink.php).



The page_name, after the patch provided in this bug report, is saving correctly in the db (like &#039;Tributário&#039;). The table&#039;s default charset is latin1.



Asking on #php, I was told I should change de charset of the table&#039;s fields to UTF-8.



I&#039;m confused, because fields on my turba_objects table, for example, are also latin1 and I never had trouble concerning arbitrary characters on them. And, on the other hand, phpMyAdmin are capable of displaying the page_names on wicked_pages table just fine, what makes me guess this is something that can be handled on the fly, through php, without any db fields attributes changing.



If that&#039;s the case, is this a task for wicked or for Text_Wiki? Or should I really change the db field charset?

</description> 
   <pubDate>Tue, 30 Dec 2008 04:00:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51493</link> 
  </item> 
   
  <item> 
   <title>It would certainly help narrow things down if you tried it t</title> 
   <description>It would certainly help narrow things down if you tried it to see if it fixes the problem.</description> 
   <pubDate>Tue, 30 Dec 2008 05:04:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51502</link> 
  </item> 
   
  <item> 
   <title>I did the tests. It makes no difference the charset defined </title> 
   <description>I did the tests. It makes no difference the charset defined for the field in the db.



I saved data in both situations (when charset for the page_name field is latin1_swedish_ci - the default - and when it is utf8_unicode_ci).



In any case, the data (page name) will be saved correctly only when using the patched sql.php.



But when using the patched sql.php, then a lot things break, like the inability to identify already created pages (which, by consequence - I think - breaks the identification of a renamed page during rename operation).



This shows why pages are not identified as already created:



http://img377.imageshack.us/img377/504/variablesbn0.jpg



Also, permissions get troubled, because page names are displayed incorrectly:



http://img367.imageshack.us/img367/6181/permsgn5.jpg

</description> 
   <pubDate>Tue, 30 Dec 2008 06:10:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51503</link> 
  </item> 
   
  <item> 
   <title>Ok, should be fixed now. A few more sql queries needed chars</title> 
   <description>Ok, should be fixed now. A few more sql queries needed charset handling, specially getPages() and renamePage() functions.



As I was already changing it, I also added two functions (_convertToDriver() and _convertFromDriver()), and then altered all the long String::convert..., in order to make the file more readable, following the same style as Turba driver.



Renaming pages with special chars works just fine now, as also permissions are working great.



The patch is attached.



Thanks.</description> 
   <pubDate>Tue, 30 Dec 2008 17:30:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51515</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/wicked/lib/Driver/sql.php?rt=horde&amp;r1=1.81&amp;r2=1.82&amp;ty=u</description> 
   <pubDate>Wed, 31 Dec 2008 02:48:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51519</link> 
  </item> 
   
  <item> 
   <title>Patch looks excellent - committed, thanks!</title> 
   <description>Patch looks excellent - committed, thanks!</description> 
   <pubDate>Wed, 31 Dec 2008 02:49:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7805#t51520</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
