Chinese characters - characterset wrong

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

johannes_77
Posts: 19
Joined: Mon Mar 09, 2009 8:47 pm

Chinese characters - characterset wrong

Post by johannes_77 »

HI there,

I would like to send newsletters in chinese. Unfortunatelly one can not save text in chinese with openemm. This is most likely sinnce the database tables are not set to unicode.

I tried to find the table where the html newsletter is saved, but could not find it! Where are the mailing contents saved in which table? I looked at all structures without success.

If I could find it, I could change the char set to unicode and fix it.

Thank you for any help!
Johannes Siebert
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

You can find a description of the OpenEMM tables and fields here:

http://www.openemm.org/fileadmin/docs/O ... le-Doc.txt

Content is stored in tables "component_tbl" and "dyn_content_tbl". Both tables are defined as UTF-8 tables (see seed file openemm.sql).

Another tip: Force the JDBC driver to use UTF-8. To do this, edit file emm.properties in directory

Code: Select all

/home/openemm/webapps/core/WEB-INF/classes
Search for line

Code: Select all

jdbc.url=jdbc:mysql://localhost/openemm
and change it to

Code: Select all

jdbc.url=jdbc:mysql://localhost/openemm?useUnicode=yes&characterEncoding=UTF-8
After that change restart OpenEMM with

Code: Select all

su - openemm
OpenEMM.sh stop
OpenEMM.sh start
exit
Last edited by maschoff on Mon Jun 15, 2009 10:57 am, edited 1 time in total.
OpenEMM Maintainer
CharlesGuo
Posts: 7
Joined: Mon Jun 15, 2009 6:48 am

Post by CharlesGuo »

I have the same question: Chinese Simple Character can't store and display correctly!

when I change the emm.properties and restart Resin, the Resign re-change
"emm.properties" and lost the change;

When I change emm.properties and set it "Read-Only", Resin can't start.

So what is wrong there?
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Resin does not touch emm.properties. The reason for your problem must be somewhere else.
OpenEMM Maintainer
CharlesGuo
Posts: 7
Joined: Mon Jun 15, 2009 6:48 am

Post by CharlesGuo »

I found openemm.py code:


Line 44 "replaces = [
'jdbc.url=jdbc:mysql://127.0.0.1/openemm',"

This is the reason they replace my emm.properties
CharlesGuo
Posts: 7
Joined: Mon Jun 15, 2009 6:48 am

Post by CharlesGuo »

I open openemm.py

replace

Line 44 "replaces = [
'jdbc.url=jdbc:mysql://127.0.0.1/openemm',"


with
Line 44 "replaces = [
'jdbc.url=jdbc:mysql://127.0.0.1/openemm?useUnicode=yes&characterEncoding=UTF-8',"


It is work well.
Thanks MA.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Oops, wasn't aware you use the Windows version. openemm.py is not included in the Linux version. Thanks for your hint, we will adapt openemm.py for the next release!
OpenEMM Maintainer
Post Reply