You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ingo Wolfmayr <in...@wolfix.at> on 2017/04/02 17:29:58 UTC
AW: Special char
Thanks, that fixed it.
I am working on moving to postgresql. Did you move an existing ofbiz-mysql database to postgresql? If yes, what was your way of doing it if I may ask?
-----Ursprüngliche Nachricht-----
Von: Mike [mailto:mz4wheeler@gmail.com]
Gesendet: Samstag, 1. April 2017 01:10
An: user <us...@ofbiz.apache.org>
Betreff: Re: Special char
I had this exact same problem back when I was using mysql. This is how I finally got mysql to properly render UTF8
entity.properties
character-set="utf8"
collate="utf8_general_ci">
jdbc-uri="jdbc:mysql://
10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
Also:
my.cnf
character-set-server=utf8
default-collation=utf8_unicode_ci
Then (I believe) you have to re-create the database to pick up the UTF8 stuff and reload the UTF8 data. There may be a way to convert an existing DB on the fly to UTF8... However:
The data in the DB is not UTF8 so you are (most likely) screwed. THIS is exactly why I ditched mysql and went with postgresql, where everything is
UTF8 by default.
On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr <in...@wolfix.at>
wrote:
> Hi everybody,
>
> I have a question regarding special chars:
>
> Environment: Ofbiz trunk, Mysql 5.6
> Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
> localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
>
> I have the following strings:
> 1) Käse
> 2) Akrapovič
>
> The first one is working. The second becomes Akrapovi?
>
> Both strings work in the online demo. Does anyone has an idea what I
> may do wrong?
>
> Best regards,
> Ingo
>
Re: Special char
Posted by Mike <mz...@gmail.com>.
> easily solved by changing the structure in the back end table.
Probably. I seem to recall trying this years ago, and I had to re-import
already imported UTF8 data (like the demo data). Still you have to modify
entity.properties and my.cnf so new data will render properly.
On Sun, Apr 2, 2017 at 1:52 PM, Chris Clark <ri...@gmail.com> wrote:
> I still say this should be easily solved by changing the structure in the
> back end table.
>
> On Apr 2, 2017 3:44 PM, "Mike" <mz...@gmail.com> wrote:
>
> > Great.... Incidentally, I have no idea why the default for mysql,
> *STILL*,
> > for ofbiz, is not UTF8. Any modern database should, by default, be UTF8
> > compliant. The reason why the ofbiz multi-language demo works be because
> > the backend is PostgreSQL. If the same demo data was hosted by mysql, the
> > demo wouldn't even work with the defaults in entity.properties.
> >
> > Committers: Please justify this.
> >
> > Converting to postgresq?
> >
> > https://wiki.postgresql.org/wiki/Converting_from_other_
> > Databases_to_PostgreSQL
> >
> > On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr <in...@wolfix.at>
> > wrote:
> >
> > > Thanks, that fixed it.
> > >
> > > I am working on moving to postgresql. Did you move an existing
> > ofbiz-mysql
> > > database to postgresql? If yes, what was your way of doing it if I may
> > ask?
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Mike [mailto:mz4wheeler@gmail.com]
> > > Gesendet: Samstag, 1. April 2017 01:10
> > > An: user <us...@ofbiz.apache.org>
> > > Betreff: Re: Special char
> > >
> > > I had this exact same problem back when I was using mysql. This is
> how I
> > > finally got mysql to properly render UTF8
> > >
> > > entity.properties
> > > character-set="utf8"
> > > collate="utf8_general_ci">
> > > jdbc-uri="jdbc:mysql://
> > > 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
> > >
> > > Also:
> > > my.cnf
> > > character-set-server=utf8
> > > default-collation=utf8_unicode_ci
> > >
> > > Then (I believe) you have to re-create the database to pick up the UTF8
> > > stuff and reload the UTF8 data. There may be a way to convert an
> > existing
> > > DB on the fly to UTF8... However:
> > >
> > > The data in the DB is not UTF8 so you are (most likely) screwed. THIS
> is
> > > exactly why I ditched mysql and went with postgresql, where everything
> is
> > > UTF8 by default.
> > >
> > > On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr <
> ingo.wolfmayr@wolfix.at>
> > > wrote:
> > >
> > > > Hi everybody,
> > > >
> > > > I have a question regarding special chars:
> > > >
> > > > Environment: Ofbiz trunk, Mysql 5.6
> > > > Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
> > > > localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
> > > >
> > > > I have the following strings:
> > > > 1) Käse
> > > > 2) Akrapovič
> > > >
> > > > The first one is working. The second becomes Akrapovi?
> > > >
> > > > Both strings work in the online demo. Does anyone has an idea what I
> > > > may do wrong?
> > > >
> > > > Best regards,
> > > > Ingo
> > > >
> > >
> >
>
Re: Special char
Posted by Chris Clark <ri...@gmail.com>.
I still say this should be easily solved by changing the structure in the
back end table.
On Apr 2, 2017 3:44 PM, "Mike" <mz...@gmail.com> wrote:
> Great.... Incidentally, I have no idea why the default for mysql, *STILL*,
> for ofbiz, is not UTF8. Any modern database should, by default, be UTF8
> compliant. The reason why the ofbiz multi-language demo works be because
> the backend is PostgreSQL. If the same demo data was hosted by mysql, the
> demo wouldn't even work with the defaults in entity.properties.
>
> Committers: Please justify this.
>
> Converting to postgresq?
>
> https://wiki.postgresql.org/wiki/Converting_from_other_
> Databases_to_PostgreSQL
>
> On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr <in...@wolfix.at>
> wrote:
>
> > Thanks, that fixed it.
> >
> > I am working on moving to postgresql. Did you move an existing
> ofbiz-mysql
> > database to postgresql? If yes, what was your way of doing it if I may
> ask?
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Mike [mailto:mz4wheeler@gmail.com]
> > Gesendet: Samstag, 1. April 2017 01:10
> > An: user <us...@ofbiz.apache.org>
> > Betreff: Re: Special char
> >
> > I had this exact same problem back when I was using mysql. This is how I
> > finally got mysql to properly render UTF8
> >
> > entity.properties
> > character-set="utf8"
> > collate="utf8_general_ci">
> > jdbc-uri="jdbc:mysql://
> > 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
> >
> > Also:
> > my.cnf
> > character-set-server=utf8
> > default-collation=utf8_unicode_ci
> >
> > Then (I believe) you have to re-create the database to pick up the UTF8
> > stuff and reload the UTF8 data. There may be a way to convert an
> existing
> > DB on the fly to UTF8... However:
> >
> > The data in the DB is not UTF8 so you are (most likely) screwed. THIS is
> > exactly why I ditched mysql and went with postgresql, where everything is
> > UTF8 by default.
> >
> > On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr <in...@wolfix.at>
> > wrote:
> >
> > > Hi everybody,
> > >
> > > I have a question regarding special chars:
> > >
> > > Environment: Ofbiz trunk, Mysql 5.6
> > > Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
> > > localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
> > >
> > > I have the following strings:
> > > 1) Käse
> > > 2) Akrapovič
> > >
> > > The first one is working. The second becomes Akrapovi?
> > >
> > > Both strings work in the online demo. Does anyone has an idea what I
> > > may do wrong?
> > >
> > > Best regards,
> > > Ingo
> > >
> >
>
Re: Special char
Posted by Mike <mz...@gmail.com>.
> The demo is not backed by PostgreSQL but Apache Derby, same for OFBiz
when installed locally.
Thanks Jacques. Good to know. Maybe Derby is by default UTF8, but I
haven't been able to verify this.
On Sun, Apr 2, 2017 at 10:08 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:
> Hi Mike,
>
> Inline
>
> Le 02/04/2017 à 22:44, Mike a écrit :
>
>> Great.... Incidentally, I have no idea why the default for mysql,
>> *STILL*,
>> for ofbiz, is not UTF8.
>>
> The MySQL specifications in entityengine.xml are old. They need to be
> updated. Please create a Jira for that, follow
> https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+
> Contributors+Best+Practices
>
>> Any modern database should, by default, be UTF8
>> compliant. The reason why the ofbiz multi-language demo works be because
>> the backend is PostgreSQL. If the same demo data was hosted by mysql, the
>> demo wouldn't even work with the defaults in entity.properties.
>>
>> Committers: Please justify this.
>>
> The demo is not backed by PostgreSQL but Apache Derby, same for OFBiz when
> installed locally.
>
>> Converting to postgresq?
>>
>> https://wiki.postgresql.org/wiki/Converting_from_other_Datab
>> ases_to_PostgreSQL
>>
> The OFBiz projects has not special recommendations about RDMS to use.
> Because it depends on your needs, etc. Apache Derby is not recommended for
> production though.
> I personally, and a number of other committers, recommend to use
> PostgreSQL, but once correctly configured MySQL and its avatars are also
> good choices.
>
> Jacques
>
>
>> On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr <in...@wolfix.at>
>> wrote:
>>
>> Thanks, that fixed it.
>>>
>>> I am working on moving to postgresql. Did you move an existing
>>> ofbiz-mysql
>>> database to postgresql? If yes, what was your way of doing it if I may
>>> ask?
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Mike [mailto:mz4wheeler@gmail.com]
>>> Gesendet: Samstag, 1. April 2017 01:10
>>> An: user <us...@ofbiz.apache.org>
>>> Betreff: Re: Special char
>>>
>>> I had this exact same problem back when I was using mysql. This is how I
>>> finally got mysql to properly render UTF8
>>>
>>> entity.properties
>>> character-set="utf8"
>>> collate="utf8_general_ci">
>>> jdbc-uri="jdbc:mysql://
>>> 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
>>>
>>> Also:
>>> my.cnf
>>> character-set-server=utf8
>>> default-collation=utf8_unicode_ci
>>>
>>> Then (I believe) you have to re-create the database to pick up the UTF8
>>> stuff and reload the UTF8 data. There may be a way to convert an
>>> existing
>>> DB on the fly to UTF8... However:
>>>
>>> The data in the DB is not UTF8 so you are (most likely) screwed. THIS is
>>> exactly why I ditched mysql and went with postgresql, where everything is
>>> UTF8 by default.
>>>
>>> On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr <in...@wolfix.at>
>>> wrote:
>>>
>>> Hi everybody,
>>>>
>>>> I have a question regarding special chars:
>>>>
>>>> Environment: Ofbiz trunk, Mysql 5.6
>>>> Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
>>>> localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
>>>>
>>>> I have the following strings:
>>>> 1) Käse
>>>> 2) Akrapovič
>>>>
>>>> The first one is working. The second becomes Akrapovi?
>>>>
>>>> Both strings work in the online demo. Does anyone has an idea what I
>>>> may do wrong?
>>>>
>>>> Best regards,
>>>> Ingo
>>>>
>>>>
>
Re: AW: Special char
Posted by Jacques Le Roux <ja...@les7arts.com>.
Good idea Ingo,
Done and also in entity engine definition. Feel free to edit yourself next time or to create a Jira ;)
Jacques
Le 03/04/2017 � 08:38, Ingo Wolfmayr a �crit :
> Hi,
>
> maybe it would be a good idea to adopt the Mysql Wiki:
>
> https://cwiki.apache.org/confluence/display/OFBIZ/How+to+migrate+OFBiz+from+Derby+to+MySQL+database
>
> entity.properties:
> change character-set="latin1" to character-set="utf8"
> change collate="latin1_general_cs" to "utf8_general_ci"
> change jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true" to jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true ;characterEncoding=UTF-8"
>
> mysql.conf
> [client]
> default-character-set=utf8
> [mysql]
> default-character-set=utf8
> [mysqld]
> collation-server = utf8_unicode_ci
> init-connect='SET NAMES utf8'
> character-set-server = utf8
>
> Mysql Version: > 5.6.4 (supports datetime milliseconds)
>
> Best regards,
> Ingo
>
> -----Urspr�ngliche Nachricht-----
> Von: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
> Gesendet: Montag, 3. April 2017 07:08
> An: user@ofbiz.apache.org
> Betreff: Re: Special char
>
> Hi Mike,
>
> Inline
>
> Le 02/04/2017 � 22:44, Mike a �crit :
>> Great.... Incidentally, I have no idea why the default for mysql,
>> *STILL*, for ofbiz, is not UTF8.
> The MySQL specifications in entityengine.xml are old. They need to be updated. Please create a Jira for that, follow https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>> Any modern database should, by default, be UTF8 compliant. The
>> reason why the ofbiz multi-language demo works be because the backend
>> is PostgreSQL. If the same demo data was hosted by mysql, the demo
>> wouldn't even work with the defaults in entity.properties.
>>
>> Committers: Please justify this.
> The demo is not backed by PostgreSQL but Apache Derby, same for OFBiz when installed locally.
>> Converting to postgresq?
>>
>> https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_Po
>> stgreSQL
> The OFBiz projects has not special recommendations about RDMS to use. Because it depends on your needs, etc. Apache Derby is not recommended for production though.
> I personally, and a number of other committers, recommend to use PostgreSQL, but once correctly configured MySQL and its avatars are also good choices.
>
> Jacques
>> On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr
>> <in...@wolfix.at>
>> wrote:
>>
>>> Thanks, that fixed it.
>>>
>>> I am working on moving to postgresql. Did you move an existing
>>> ofbiz-mysql database to postgresql? If yes, what was your way of doing it if I may ask?
>>>
>>> -----Urspr�ngliche Nachricht-----
>>> Von: Mike [mailto:mz4wheeler@gmail.com]
>>> Gesendet: Samstag, 1. April 2017 01:10
>>> An: user <us...@ofbiz.apache.org>
>>> Betreff: Re: Special char
>>>
>>> I had this exact same problem back when I was using mysql. This is
>>> how I finally got mysql to properly render UTF8
>>>
>>> entity.properties
>>> character-set="utf8"
>>> collate="utf8_general_ci">
>>> jdbc-uri="jdbc:mysql://
>>> 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
>>>
>>> Also:
>>> my.cnf
>>> character-set-server=utf8
>>> default-collation=utf8_unicode_ci
>>>
>>> Then (I believe) you have to re-create the database to pick up the
>>> UTF8 stuff and reload the UTF8 data. There may be a way to convert
>>> an existing DB on the fly to UTF8... However:
>>>
>>> The data in the DB is not UTF8 so you are (most likely) screwed.
>>> THIS is exactly why I ditched mysql and went with postgresql, where
>>> everything is
>>> UTF8 by default.
>>>
>>> On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr
>>> <in...@wolfix.at>
>>> wrote:
>>>
>>>> Hi everybody,
>>>>
>>>> I have a question regarding special chars:
>>>>
>>>> Environment: Ofbiz trunk, Mysql 5.6
>>>> Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
>>>> localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
>>>>
>>>> I have the following strings:
>>>> 1) K�se
>>>> 2) Akrapovi\u010d
>>>>
>>>> The first one is working. The second becomes Akrapovi?
>>>>
>>>> Both strings work in the online demo. Does anyone has an idea what I
>>>> may do wrong?
>>>>
>>>> Best regards,
>>>> Ingo
>>>>
AW: Special char
Posted by Ingo Wolfmayr <in...@wolfix.at>.
Hi,
maybe it would be a good idea to adopt the Mysql Wiki:
https://cwiki.apache.org/confluence/display/OFBIZ/How+to+migrate+OFBiz+from+Derby+to+MySQL+database
entity.properties:
change character-set="latin1" to character-set="utf8"
change collate="latin1_general_cs" to "utf8_general_ci"
change jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true" to jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true ;characterEncoding=UTF-8"
mysql.conf
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
Mysql Version: > 5.6.4 (supports datetime milliseconds)
Best regards,
Ingo
-----Ursprüngliche Nachricht-----
Von: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com]
Gesendet: Montag, 3. April 2017 07:08
An: user@ofbiz.apache.org
Betreff: Re: Special char
Hi Mike,
Inline
Le 02/04/2017 à 22:44, Mike a écrit :
> Great.... Incidentally, I have no idea why the default for mysql,
> *STILL*, for ofbiz, is not UTF8.
The MySQL specifications in entityengine.xml are old. They need to be updated. Please create a Jira for that, follow https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> Any modern database should, by default, be UTF8 compliant. The
> reason why the ofbiz multi-language demo works be because the backend
> is PostgreSQL. If the same demo data was hosted by mysql, the demo
> wouldn't even work with the defaults in entity.properties.
>
> Committers: Please justify this.
The demo is not backed by PostgreSQL but Apache Derby, same for OFBiz when installed locally.
> Converting to postgresq?
>
> https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_Po
> stgreSQL
The OFBiz projects has not special recommendations about RDMS to use. Because it depends on your needs, etc. Apache Derby is not recommended for production though.
I personally, and a number of other committers, recommend to use PostgreSQL, but once correctly configured MySQL and its avatars are also good choices.
Jacques
>
> On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr
> <in...@wolfix.at>
> wrote:
>
>> Thanks, that fixed it.
>>
>> I am working on moving to postgresql. Did you move an existing
>> ofbiz-mysql database to postgresql? If yes, what was your way of doing it if I may ask?
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Mike [mailto:mz4wheeler@gmail.com]
>> Gesendet: Samstag, 1. April 2017 01:10
>> An: user <us...@ofbiz.apache.org>
>> Betreff: Re: Special char
>>
>> I had this exact same problem back when I was using mysql. This is
>> how I finally got mysql to properly render UTF8
>>
>> entity.properties
>> character-set="utf8"
>> collate="utf8_general_ci">
>> jdbc-uri="jdbc:mysql://
>> 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
>>
>> Also:
>> my.cnf
>> character-set-server=utf8
>> default-collation=utf8_unicode_ci
>>
>> Then (I believe) you have to re-create the database to pick up the
>> UTF8 stuff and reload the UTF8 data. There may be a way to convert
>> an existing DB on the fly to UTF8... However:
>>
>> The data in the DB is not UTF8 so you are (most likely) screwed.
>> THIS is exactly why I ditched mysql and went with postgresql, where
>> everything is
>> UTF8 by default.
>>
>> On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr
>> <in...@wolfix.at>
>> wrote:
>>
>>> Hi everybody,
>>>
>>> I have a question regarding special chars:
>>>
>>> Environment: Ofbiz trunk, Mysql 5.6
>>> Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
>>> localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
>>>
>>> I have the following strings:
>>> 1) Käse
>>> 2) Akrapovič
>>>
>>> The first one is working. The second becomes Akrapovi?
>>>
>>> Both strings work in the online demo. Does anyone has an idea what I
>>> may do wrong?
>>>
>>> Best regards,
>>> Ingo
>>>
Re: Special char
Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Mike,
Inline
Le 02/04/2017 � 22:44, Mike a �crit :
> Great.... Incidentally, I have no idea why the default for mysql, *STILL*,
> for ofbiz, is not UTF8.
The MySQL specifications in entityengine.xml are old. They need to be updated. Please create a Jira for that, follow
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> Any modern database should, by default, be UTF8
> compliant. The reason why the ofbiz multi-language demo works be because
> the backend is PostgreSQL. If the same demo data was hosted by mysql, the
> demo wouldn't even work with the defaults in entity.properties.
>
> Committers: Please justify this.
The demo is not backed by PostgreSQL but Apache Derby, same for OFBiz when installed locally.
> Converting to postgresq?
>
> https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
The OFBiz projects has not special recommendations about RDMS to use. Because it depends on your needs, etc. Apache Derby is not recommended for
production though.
I personally, and a number of other committers, recommend to use PostgreSQL, but once correctly configured MySQL and its avatars are also good choices.
Jacques
>
> On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr <in...@wolfix.at>
> wrote:
>
>> Thanks, that fixed it.
>>
>> I am working on moving to postgresql. Did you move an existing ofbiz-mysql
>> database to postgresql? If yes, what was your way of doing it if I may ask?
>>
>> -----Urspr�ngliche Nachricht-----
>> Von: Mike [mailto:mz4wheeler@gmail.com]
>> Gesendet: Samstag, 1. April 2017 01:10
>> An: user <us...@ofbiz.apache.org>
>> Betreff: Re: Special char
>>
>> I had this exact same problem back when I was using mysql. This is how I
>> finally got mysql to properly render UTF8
>>
>> entity.properties
>> character-set="utf8"
>> collate="utf8_general_ci">
>> jdbc-uri="jdbc:mysql://
>> 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
>>
>> Also:
>> my.cnf
>> character-set-server=utf8
>> default-collation=utf8_unicode_ci
>>
>> Then (I believe) you have to re-create the database to pick up the UTF8
>> stuff and reload the UTF8 data. There may be a way to convert an existing
>> DB on the fly to UTF8... However:
>>
>> The data in the DB is not UTF8 so you are (most likely) screwed. THIS is
>> exactly why I ditched mysql and went with postgresql, where everything is
>> UTF8 by default.
>>
>> On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr <in...@wolfix.at>
>> wrote:
>>
>>> Hi everybody,
>>>
>>> I have a question regarding special chars:
>>>
>>> Environment: Ofbiz trunk, Mysql 5.6
>>> Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
>>> localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
>>>
>>> I have the following strings:
>>> 1) K�se
>>> 2) Akrapovi\u010d
>>>
>>> The first one is working. The second becomes Akrapovi?
>>>
>>> Both strings work in the online demo. Does anyone has an idea what I
>>> may do wrong?
>>>
>>> Best regards,
>>> Ingo
>>>
Re: Special char
Posted by Mike <mz...@gmail.com>.
Great.... Incidentally, I have no idea why the default for mysql, *STILL*,
for ofbiz, is not UTF8. Any modern database should, by default, be UTF8
compliant. The reason why the ofbiz multi-language demo works be because
the backend is PostgreSQL. If the same demo data was hosted by mysql, the
demo wouldn't even work with the defaults in entity.properties.
Committers: Please justify this.
Converting to postgresq?
https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL
On Sun, Apr 2, 2017 at 10:29 AM, Ingo Wolfmayr <in...@wolfix.at>
wrote:
> Thanks, that fixed it.
>
> I am working on moving to postgresql. Did you move an existing ofbiz-mysql
> database to postgresql? If yes, what was your way of doing it if I may ask?
>
> -----Ursprüngliche Nachricht-----
> Von: Mike [mailto:mz4wheeler@gmail.com]
> Gesendet: Samstag, 1. April 2017 01:10
> An: user <us...@ofbiz.apache.org>
> Betreff: Re: Special char
>
> I had this exact same problem back when I was using mysql. This is how I
> finally got mysql to properly render UTF8
>
> entity.properties
> character-set="utf8"
> collate="utf8_general_ci">
> jdbc-uri="jdbc:mysql://
> 10.2.10.101/ofbiz?autoReconnect=true;characterEncoding=UTF-8"
>
> Also:
> my.cnf
> character-set-server=utf8
> default-collation=utf8_unicode_ci
>
> Then (I believe) you have to re-create the database to pick up the UTF8
> stuff and reload the UTF8 data. There may be a way to convert an existing
> DB on the fly to UTF8... However:
>
> The data in the DB is not UTF8 so you are (most likely) screwed. THIS is
> exactly why I ditched mysql and went with postgresql, where everything is
> UTF8 by default.
>
> On Fri, Mar 31, 2017 at 2:39 AM, Ingo Wolfmayr <in...@wolfix.at>
> wrote:
>
> > Hi everybody,
> >
> > I have a question regarding special chars:
> >
> > Environment: Ofbiz trunk, Mysql 5.6
> > Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://
> > localhost/ofbiz_test?autoReconnect=true&characterEncoding=UTF-8"
> >
> > I have the following strings:
> > 1) Käse
> > 2) Akrapovič
> >
> > The first one is working. The second becomes Akrapovi?
> >
> > Both strings work in the online demo. Does anyone has an idea what I
> > may do wrong?
> >
> > Best regards,
> > Ingo
> >
>