[opencms-dev] Bad encoding in properties on Opencms6

Tomáš Adámek tomas.adamek at qbizm.cz
Thu Jan 12 10:28:05 CET 2006


Hello,

thx for your answer, the database has set utf8 as default encoding, when 
I check the SHOW CREATE TABLE it looks ok.

mysql> show create database opencms6;
+----------+-------------------------------------------------------------------+
| Database | Create Database 
        |
+----------+-------------------------------------------------------------------+
| opencms6 | CREATE DATABASE `opencms6` /*!40100 DEFAULT CHARACTER SET 
utf8 */ |
+----------+-------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table CMS_OFFLINE_PROPERTIES;
+------------------------+--
*******
) ENGINE=MyISAM DEFAULT CHARSET=utf8
+------------------------+--

mysql> show columns from CMS_OFFLINE_PROPERTIES;
+-----------------------+-------------+------+-----+---------+-------+
| Field                 | Type        | Null | Key | Default | Extra |
+-----------------------+-------------+------+-----+---------+-------+
| PROPERTY_ID           | varchar(36) |      | PRI |         |       |
| PROPERTYDEF_ID        | varchar(36) |      | MUL |         |       |
| PROPERTY_MAPPING_ID   | varchar(36) |      | MUL |         |       |
| PROPERTY_MAPPING_TYPE | int(11)     |      |     | 0       |       |
| PROPERTY_VALUE        | text        |      |     |         |       |
+-----------------------+-------------+------+-----+---------+-------+
5 rows in set (0.02 sec)

So everything looks just fine but I have still problems with non iso 
latin 1 characters in properties (the file content is ok!). I tried to 
put there some arabian characters too, but with same result. When i save 
title or some other properties from dialog window, non iso latin 1 
characters are replaced by '?'.

But what is really weird - i tried to check my tables with

myisamchk -dvv opencms6/CMS_ONLINE_PROPERTIES.MYI

And get this:

MyISAM file:         opencms6/CMS_OFFLINE_PROPERTIES.MYI
Record format:       Packed
Character set:       latin1_swedish_ci (8)
*************

When i try to do same test on my windows develop machine with same 
version of mysql database, tomcat and java, i get:

MyISAM file:         cms_offline_properties.MYI
Record format:       Packed
Character set:       utf8_general_ci (33)
*************

So i tried to fix this issue with:

myisamchk -r -q --set-character-set="utf8" 
opencms6/CMS_ONLINE_PROPERTIES.MYI

But it didnt work, couse the 'set-character-set' parameter of myisamchk 
was removed in version 4.1* and i hadnt find any other similar method 
how to fix the table.

So, had some1 other same or similar problems with non iso latin 1 
characters in properties on linux installations and did he solve it, or 
does it work correctly for every1 and I am the only one who has problems 
like these? I will really appreciate any help, thanks.

--
Tomas Adamek                                Qbizm technologies, a.s.
analyst-developer                           ... the art of software.
____________________________________________________________________
www.qbizm-technologies.cz    www.qbizm.cz      www.qbizm-services.cz


spyros napsal(a):
> What about your database? Are you on MySQL 4.1 or later? Check character 
> set for both tables and columns of your tables. Change all to UTF8. 
> Careful, I think that columns can have different character set than 
> their tables, version 4.1 and onwards.
> 
> Spyros Michas
> 
> 
> ----- Original Message ----- From: "Tomáš Adámek" <tomas.adamek at qbizm.cz>
> To: "The OpenCms mailing list" <opencms-dev at opencms.org>
> Sent: Tuesday, January 10, 2006 6:21 PM
> Subject: [opencms-dev] Bad encoding in properties on Opencms6
> 
> 
>> Hello,
>>
>> I have problems with setting title/navtext properties of resources on 
>> opencms linux installation. I created my modul on windows installation 
>> of opencms, everything worked just fine. But then I tried to install 
>> this modul on Linux development machine and I got some problems with 
>> czech text in properties. I am not able to set title properties with 
>> czech characters in it, I just get '???' instant of it ;/
>>
>> I know that there must be some parameter of tomcat 5.5+ enabled for 
>> request encoding problems, but it did help only for old opencms 5 
>> version, it didnt help on opencms 6 now.
>>
>> Thx for any help, Tomas Adamek.
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please 
>> visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list