Show different charset in UTF8 content
Posted: Wed Aug 29, 2007 8:55 pm
Hello,
I have this problem.
I am trying to display the content of DB in cp1250 on my page, which is in UTF8 and another mySQL database.
I have created my own UDT called php_projekty which is connecting the DB and then echo-ing the result.
------------
mysql_connect('server_name','login','password');
mysql_select_db('test');
$dnes = date("Y-m-d");
$query = "SELECT nazov, cislo, zaciatok, koniec, riesitel, popis, id, radenie FROM projekty where radenie>='$dnes' ORDER BY radenie ASC" ; // Standard query.
$result = mysql_query ($query);
$pocet = mysql_num_rows($result);
{echo 'Rozpracované projekty (', $pocet, ')
';}
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{echo '
', $row[0], '
Projekt č:', $row[1], '
Začiatok riešenia:', $row[2], '
Koniec riešenia: ', $row[3], ', projekt je v realizácii
Zodpovedný riešiteľ:', $row[4], '
>>> viac o projekte
-------------
and the in the content page inserted
{php_projekty}
The problem is, that the special /local/ characters are not showing well and I become lot of ? and so on.
Is it possible to store the table in cp1250 and convert it somehow to utf8?
Thanks a lot
Miro
I have this problem.
I am trying to display the content of DB in cp1250 on my page, which is in UTF8 and another mySQL database.
I have created my own UDT called php_projekty which is connecting the DB and then echo-ing the result.
------------
mysql_connect('server_name','login','password');
mysql_select_db('test');
$dnes = date("Y-m-d");
$query = "SELECT nazov, cislo, zaciatok, koniec, riesitel, popis, id, radenie FROM projekty where radenie>='$dnes' ORDER BY radenie ASC" ; // Standard query.
$result = mysql_query ($query);
$pocet = mysql_num_rows($result);
{echo 'Rozpracované projekty (', $pocet, ')
';}
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{echo '
', $row[0], '
Projekt č:', $row[1], '
Začiatok riešenia:', $row[2], '
Koniec riešenia: ', $row[3], ', projekt je v realizácii
Zodpovedný riešiteľ:', $row[4], '
>>> viac o projekte
-------------
and the in the content page inserted
{php_projekty}
The problem is, that the special /local/ characters are not showing well and I become lot of ? and so on.
Is it possible to store the table in cp1250 and convert it somehow to utf8?
Thanks a lot
Miro