Page 1 of 1

Chinese characters - characterset wrong

Posted: Thu May 28, 2009 11:01 am
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!

Posted: Wed Jun 03, 2009 1:55 pm
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

Posted: Tue Jun 16, 2009 5:07 am
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?

Posted: Tue Jun 16, 2009 7:51 am
by maschoff
Resin does not touch emm.properties. The reason for your problem must be somewhere else.

Posted: Fri Jun 26, 2009 4:27 am
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

Posted: Fri Jun 26, 2009 4:37 am
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.

Posted: Fri Jun 26, 2009 9:17 am
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!