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/03/31 09:39:22 UTC

Special char

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&amp;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>.
Im pretty sure mysql databases have a structure.  although i am a little
disconnected with the ofbiz implementation in mysql, it does have a
database and that database will always have a structure and if varchar or
text is the defined structure of a column there is futher a collation of
that column.  this collation has many different enunciations of utf8 for
the various languages that utilize utf8 to its fullest.  it could be that
your specific character that is missing from that collation.  again this is
merely off the cuff speculation but you may want to look into it.

On Fri, Mar 31, 2017 at 12:27 PM, Christian Geisert <
christian.geisert@isu-gmbh.de> wrote:

> Hi,
>
> I do not remember the details (which MySQL version, maybe it was even
> MariaDB) but this did work for us:
>
> ?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8
>
> Christian
>
> Am 31.03.2017 11:39, schrieb Ingo Wolfmayr:
> > 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&amp;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 Christian Geisert <ch...@isu-gmbh.de>.
Hi,

I do not remember the details (which MySQL version, maybe it was even
MariaDB) but this did work for us:

?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8

Christian

Am 31.03.2017 11:39, schrieb Ingo Wolfmayr:
> 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&amp;characterEncoding=UTF-8"
>
> I have the following strings:
> 1) Kse
> 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 st...@comcast.net.
Consider the possibility that this is a font issue, and not an encoding issue. Every font used to display a character has an index, but not every index in a given font has a graphical glyph to render it. I would try to convert the characters to hex first and see if something in the viewing is simply not rendering a character that is there...a basic string length test. If the character really is UTF-8 then it is always a single byte and the database should not care...treating that character as a particular font is when things go bad.
 
I had some similar strange issues in DocBook. Changing default fonts solved them. The case was that illustrating a directory tree used some box drawing symbols which showed up fine in my terminal, and copy and paste into the editor also showed up well...but the generated PDF and HTML output was missing the character (it was substituted with a "missing character" symbol). The problem was that those indices into my terminal font had a different glyph than Times-Roman and Helvetica, which the PDF and HTML output used...Times-Roman and Helvetica do not have the box drawing characters (the index exists, the glyph does not). Switching to DejaVu and DejaVu Sans caused the character to show up again.
 
During the entire set of events of transferring and viewing those characters, including things like mouse copy and paste, what font is used in cases where font is relevant?
  
----- Original Message -----From: Ingo Wolfmayr <in...@wolfix.at>To: 'user@ofbiz.apache.org' <us...@ofbiz.apache.org>Sent: Fri, 31 Mar 2017 09:39:22 -0000 (UTC)Subject: Special char

Hi everybody,

I have a question regarding special chars:

Environment: Ofbiz trunk, Mysql 5.6Entity Engine: collate="utf8_unicode_ci", jdbc-uri="jdbc:mysql://localhost/ofbiz_test?autoReconnect=true&amp;characterEncoding=UTF-8"

I have the following strings:1) K&auml;se2) 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>.
It honestly shouldn't be hard to change the structure through phpmyadmin.

On Mar 31, 2017 6:09 PM, "Mike" <mz...@gmail.com> wrote:

> 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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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
> >
>

AW: Special char

Posted by Ingo Wolfmayr <in...@wolfix.at>.
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&amp;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>.
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&amp;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
>