[Erp5-dev] Using another character set and collation
Boris Kocherov
bkocherov at gmail.com
Fri Jun 20 15:51:20 CEST 2008
Witaj Łukasz.
I have the same problems and myerp5.com too.
As i have tested two things should solve this problem.
1) run this sql query
"ALTER DATABASE db_name CHARACTER SET utf8"
2) use attached patch
After all do not forget to clean and reindex catalog.
I want to commit this patch in trunk. What should i do for that?
I think that change default charset is not a good idea - the different
applications which are using mysql may need different default charset.
Regards
Boris Kocherov
Łukasz Nowak wrote:
> Hello,
>
> By default MySQL's default-character-set is latin1 and collation-server
> = default-collation = latin1_swedish_ci.
>
> But I'd like to use:
> character set latin2
> collation latin2_general_ci
>
> So I've modified my.cnf to have:
>
> [mysqld]
> character-set-server = "latin2"
> character-set-client = "latin2"
> collation-server = "latin2_general_ci"
>
>
> After this created database for ERP5 installation (eg. erp5localtest),
> made sure, that its collation is latin2_general_ci (checked twice).
>
> Installed erp5_base Business Template.
>
> Created organisation, which title has some national characters.
>
> Such script:
> for q in context.portal_catalog(
> portal_type = 'Organisation',
> title = 'Ą%' # any national character - for empty or w/o national
> charcter all is working
> ):
> print q.getRelativeUrl()
>
> return printed
>
> Produces attached traceback.
>
> What else shall I do, to use latin2 character set and collation?
>
> Revision: 20709
> Products: CMFActivity ERP5 ERP5Catalog ERP5OOo ERP5Subversion
> ERP5Type ZMySQLDA ZSQLCatalog CMFCategory ERP5Banking ERP5Form
> ERP5Security ERP5SyncML ERP5Wizard TimerService ZMySQLDDA
> Zope: (Zope 2.8.9.1-final, python 2.4.4, linux2)
>
> Regards,
> Luke
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Erp5-dev mailing list
> Erp5-dev at erp5.org
> http://mail.nexedi.com/mailman/listinfo/erp5-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zmysqlda-default-utf8.patch
Type: text/x-diff
Size: 1113 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080620/27bb450a/attachment.patch>
More information about the Erp5-dev
mailing list