Server was switched to UTF-8

Can't get it installed? Not sure how a feature works? Then post here.

Server was switched to UTF-8

Postby jo73 » 2010-10-30 07:08 pm

Hello,

my provider switched the server, where I also have installed the topsites (version 5.2.1) from iso-8859-1 to utf-8.
As a repercussion of that the German Umlaute ä, ö, ü, etc. are not shown correctly within the topsite anymore.
Is there a chance to general turn the topsite once again into a iso-8859-1 set-up without changing the database?
This was possible at my phpbb forum with:
Code: Select all
ini_set('default_charset', 'iso-8859-1');

Is there also a general possibility at Aardvark and if yes, in which file do I have to put it?

Thank you very much in advance for your support.

Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm

Re: Server was switched to UTF-8

Postby xl1200c » 2010-10-30 09:13 pm

/sources/sql/mysql.php
recently to make my connection utf8 aware i changed
Code: Select all
  function connect ($host, $user, $password, $database, $debug = 0) {
    $this->dbl = mysql_connect($host, $user, $password);
    $db = mysql_select_db($database, $this->dbl);
to
Code: Select all
  function connect ($host, $user, $password, $database, $debug = 0) {
    $this->dbl = mysql_connect($host, $user, $password);
    mysql_set_charset("utf8", $this->dbl);
    $db = mysql_select_db($database, $this->dbl);
in your case you would substitute (if i have the iso string correct?)
Code: Select all
    mysql_set_charset("iso-8859-1", $this->dbl);
it worked for me. i hope it works for you. possibly a senior member could verify my suggestion.
xl1200c
Newbie
 
Posts: 5
Joined: 2010-10-17 09:57 pm

Re: Server was switched to UTF-8

Postby jo73 » 2010-10-31 04:15 am

Thanks for the answer.

I changed the code as described within mysql.php code first into iso-8859-1 and later on even into utf-8, but there was no change in the layout.

The text is still like this: e.g. "Kommentiert und informiert t�glich aktuell �ber..."

Any further proposals to solve this issue?

Thanks in advance.

Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm

Re: Server was switched to UTF-8

Postby Basti » 2010-10-31 06:22 am

Try this:
in sources/sql/mysql.php

find
Code: Select all
    $db = mysql_select_db($database, $this->dbl);


add after
Code: Select all
mysql_query("SET NAMES iso-8859-1");
mysql_query( "SET CHARACTER SET iso-8859-1");


Maybe put the iso into ' (single quotes) - 'iso-8859-1'
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Server was switched to UTF-8

Postby jo73 » 2010-10-31 06:56 am

Hi,

I was putting
Code: Select all
mysql_query("SET NAMES iso-8859-1");
mysql_query("SET CHARACTER SET iso-8859-1");

as well as
Code: Select all
mysql_query('SET NAMES iso-8859-1');
mysql_query('SET CHARACTER SET iso-8859-1');

but nothing happened. It remained as it was.
What to do next?
Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm

Re: Server was switched to UTF-8

Postby Basti » 2010-10-31 07:19 am

i just meant iso, not the hole line
Code: Select all
mysql_query('SET NAMES iso-8859-1');
mysql_query('SET CHARACTER SET iso-8859-1');


this
Code: Select all
mysql_query("SET NAMES 'iso-8859-1'");
mysql_query("SET CHARACTER SET 'iso-8859-1'");


If that aint work,which it should. someone else solved it by placing
Code: Select all
setlocale (LC_ALL, 'de_DE');

into index.php

I never had this problem so i dont know exactly where to place it. but try after
Code: Select all
require_once("{$CONF['path']}/languages/{$CONF['default_language']}.php");

or just play around with the placement, there i always the step backward function in your editor if it throws errors
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Server was switched to UTF-8

Postby jo73 » 2010-10-31 07:41 am

Hi,

it does not work, even with the further instructions.
I tried once again mysql.php and the index.php.
I was just adding
Code: Select all
setlocale (LC_ALL, 'de_DE');
after the respective source code. But nothing changed once again.

I cannnot believe that this is just not working with my topsites?!?

Any further help?

Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm

Re: Server was switched to UTF-8

Postby Basti » 2010-10-31 08:24 am

sorry no further tips here, these methods worked for other people, so iam not sure. You properbly have to ask your host or wait for "OS-Mark", another contributing member here who is also a webhost, if someone has an exact answer then he
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Server was switched to UTF-8

Postby jo73 » 2010-10-31 12:53 pm

...that would be really great if "OS Mark" would have an solution.

Just one more piece of information. In my .htaccess there is:
Code: Select all
AddCharset utf-8 .php .html .xhtml

written.
I do not know if this information is useful for this issue, but for all other modules (e.g. Forum, html Content) of my website I was able to re-set into iso and solve the display errors with the German Umlaute.

Thanks in advance for your support.

Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm

Re: Server was switched to UTF-8

Postby Basti » 2010-10-31 01:14 pm

Well, give it a try
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Server was switched to UTF-8

Postby jo73 » 2010-11-07 10:03 am

Hello,

any further support on this thread? I still have the issue with the German Umlaute.

So there are two solutions for me:
a) remain in ISO-8859-1 (while having my other website content in UTF-8) and switch my toplist back to this encoding via a kind of "hard coding" comparable to that what I did with my phpbb forum -> which was my original question

and if this would finally not work (I hope this is not the case):

b) turn the topsites into UTF-8; would this be possible, because when I am right, the Aardvark Topsites are programmed in UTF-8?

Thanks for your reply.

Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm

Re: Server was switched to UTF-8

Postby jo73 » 2010-11-12 02:12 pm

Hello,

now, I switched strategy and started to convert manually into UTF-8.

So far I overwrote all Umlaute of each entry and those Umlaute are now shown correctly :D

Furthermore I replaced iso-8859-1 within the file german.php (within the folder languages) by UTF-8. I also saved the german.php file with Notepad++ under "UTF-8 without BOM" and uploaded the file once again.

But the wrong Umlaute of the Aardvark Topsites files remained and if I change the Umlaut by e.g. ae, the change is displayed with ae in the topsites (e.g. Alle Eintraege) :?

What and how I have to do that also the Umlaute of the Aardvark Topsites files are shown in the correct way?

Thanks in advance.

Jo
jo73
Member
 
Posts: 10
Joined: 2008-03-21 08:11 pm


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron