Ajax DataGrid Support Product Page

Solved

German Charachters

Reported 07 Mar 2012 00:14:18
2
have this problem
07 Mar 2012 00:14:18 Denis Hoffmann posted:
Hi,

my Page ist UTF-8 and my database is set to utf8_general_ci.

In my table ist written "alle fünfe!" thats how it should be.

But on the page it does not change to the German ü ?

www.musicheadquarter.de/_editorialOffice/cd/index.php

What can I do?
Cheers
Denis

Replies

Replied 07 Mar 2012 05:56:44
07 Mar 2012 05:56:44 Teodor Kuduschiev replied:
Hello Denis,

It seems that you have problems with the encoding of the input - what is the input method you are using to insert the text into your database?
Replied 07 Mar 2012 07:31:13
07 Mar 2012 07:31:13 Denis Hoffmann replied:
On my page I use UTF-8 and the charachters are stored right.
Down the AjaxGrid there is the same VIEW TABLE, but there is the charachter correct.

•6-Zylinder alle fünfe!

Cheers,
Denis
Replied 07 Mar 2012 08:09:59
07 Mar 2012 08:09:59 Teodor Kuduschiev replied:
I asked you what way are you using to store the text in your database? Insert record, html editor? What exactly?
Replied 07 Mar 2012 11:50:50
07 Mar 2012 11:50:50 Denis Hoffmann replied:
I use the latest DMX advanced HTML3 editor. And the latest DATA Assist insert behavior from Webassist.

:-)
Replied 07 Mar 2012 12:16:23
07 Mar 2012 12:16:23 Teodor Kuduschiev replied:
Please check your php file in the connections folder, it should similar to:


<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connectionname = "localhost";
$database_connectionname = "database";
$username_connectionname = "user";
$password_connectionname = "pass";
$connectionname = mysql_pconnect($hostname_connectionname, $username_connectionname, $password_connectionname) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_query('set names utf8', $connectionname); 
?>


It is important to have this line:


mysql_query('set names utf8', $connectionname); 



Add it if it is missing.
Replied 07 Mar 2012 12:28:37
07 Mar 2012 12:28:37 Denis Hoffmann replied:
I changed like this


<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_MHQ_CMS = "www.HOSTNAME.de";
$database_MHQ_CMS = "DBNAME";
$username_MHQ_CMS = "USERNAME";
$password_MHQ_CMS = "PASSWORD";
$MHQ_CMS = mysql_pconnect($hostname_MHQ_CMS, $username_MHQ_CMS, $password_MHQ_CMS) or trigger_error(mysql_error(),E_USER_ERROR); 
mysql_query('set names utf8', $MHQ_CMS);
?>



does not work :-(

Now the list down under the Ajax Grid is wrong, too :-(

The search and delete button are wrong, too, and they are from the extension.


cheers
Denis
Replied 07 Mar 2012 14:33:54
07 Mar 2012 14:33:54 Teodor Kuduschiev replied:
Please check the collation for the column containing this character!
It seems to me it is not utf8_general_ci
Replied 07 Mar 2012 14:54:00
07 Mar 2012 14:54:00 Denis Hoffmann replied:
Everything is correct.

I changed the text in the database to german charachter, and it words.

search this artist " Stefan Gwildis "

the first is correct, but in my database its the german charachter.

the others are UTF8_general_c

Cheers,
Denis
Replied 07 Mar 2012 15:11:38
07 Mar 2012 15:11:38 Teodor Kuduschiev replied:
Hello ...

See this link: *removed*

After inserting anything in the database it displays the datagrid.
You will see the first record there is without the 'set names utf8'
The others are with it.
It is either your page encoding or the databse column that is not utf8.
Replied 07 Mar 2012 15:25:27
07 Mar 2012 15:25:27 Teodor Kuduschiev replied:
And also the database records:

Replied 07 Mar 2012 15:38:32
07 Mar 2012 15:38:32 Denis Hoffmann replied:
I see the diffrence.
in my database, the german charachters are changed into ü or something like that.
In your database, the german charachters stay german charachters and are not changed.

Your first line stays ü but in the output it must become fünfte because it is UTF8.

how is line 8 and 9 stored in your database?

it must be: mötley Crüe

www.unicodetools.com/unicode/utf8-to-latin-converter.php

Replied 07 Mar 2012 15:42:49
07 Mar 2012 15:42:49 Teodor Kuduschiev replied:
In my first line it is written wrong in the database, because the mysql_query('set names utf8'... was missing in the php file.
Replied 07 Mar 2012 15:55:30
07 Mar 2012 15:55:30 Denis Hoffmann replied:
Very strange :-(
At home I gonna try another database and table.

In my tables all german charachters are changed into ü utf code.

There is one UTF8_encoding to much, cause they are allready come right out of my database.
Replied 07 Mar 2012 15:56:34
07 Mar 2012 15:56:34 Teodor Kuduschiev replied:
Can you please send me an sql export of your database table to:

Replied 08 Mar 2012 10:33:57
08 Mar 2012 10:33:57 Denis Hoffmann replied:
Hey Teodor,

did you get my email?

Cheers,
Denis
Replied 08 Mar 2012 14:17:26
08 Mar 2012 14:17:26 Denis Hoffmann replied:
Hi Teodor,

I changed Line 29 to


// mysql_set_charset('utf8');


in my dmx_grid1.php

And now it works,
Denis

It looks like a double encoding

Reply to this topic