[opencms-dev] characters outside of iso-8859-1 as XML entities

Martin Kuba makub at ics.muni.cz
Tue Mar 23 15:19:01 CET 2004


Hi,

I am trying to use OpenCMS for a localized site, which should use
iso-8859-2 as its character set. I have set the MySQL database
to use that encoding, altered OpenCMS tables to use it,
I changed webapps/opencms/WEB-INF/config/opencms.properties
so that it has:

pool.mysql.url=jdbc:mysql://localhost:3306/opencms?useUnicode=true&characterEncoding=ISO-8859-2
pool.mysqlonline.url=jdbc:mysql://localhost:3306/opencms?useUnicode=true&characterEncoding=ISO-8859-2
pool.mysqlbackup.url=jdbc:mysql://localhost:3306/opencms?useUnicode=true&characterEncoding=ISO-8859-2
defaultContentEncoding=ISO-8859-2

But when I edit a page (even a new one) and write there
characters which are outside of iso-8859-1, on subsequent
edits and displays of the page they are converted to
XML character entities, like (full Czech alphabet):

aábcčdďeěéfghiíjklmnňoópqrřsštťuúůvwxyýzž

It looks like the entities are in stored in the database:

mysql> select * from CMS_FILES where FILE_ID = 2124;
+---------+----------------------------
| FILE_ID | FILE_CONTENT
+---------+----------------------------
|    2124 | <?xml version="1.0" encoding="ISO-8859-2"?>
<XMLTEMPLATE>
     <TEMPLATE><![CDATA[tady bude abeceda: 
aábcčdďeěéfghiíjklmnňoópqrřsštťuúůvwxyýzž]]></TEMPLATE>
     <edittemplate><![CDATA[
tady bude abeceda:

aábcčdďeěéfghiíjklmnňoópqrřsštťuúůvwxyýzž

  ]]></edittemplate>
</XMLTEMPLATE>
+---------+----------------------------

Can anybody help me ? The entities are unacceptable. I don't
know the architecture of OpenCMS, so I don't know whether this may
be caused by XML parser or some other part of the system.

I am using Mozilla for editing the pages, and I am using
Xerces 2.5 with OpenCMS.

Martin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub at ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3415 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040323/9fea072d/attachment.bin>


More information about the opencms-dev mailing list