March 30th, 2004, 10:03 AM
Outputted cyrillic text is displayed wrong
I searched a long time for an answer to my question, but I have not found a satisfying one yet... And I really do not know if it is a SQL-Server problem or a PHP problem so I postet this thread in both, the SQL-Server and the PHP, forums.
I save cyrillic texts in a Microsoft SQL-Server database. No problem at all.
I connect to the database via ODBC as it is with PHP not possible to read a ntext field from the database. Data is read out correctly in german or english and displayed correctly as well.
But when I change the language to Russia which means that the cyrillic texts are read out, only "???" appears (see attachment).
Has anobody ever dealt with this problem?
In my HTML-file there is the following tag when the russia language is chosen:
Thank you very much for your answers.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1251">
Last edited by Slain84; March 30th, 2004 at 10:14 AM.
you need to add a header to you output.
before you send the html back to your user add this
<?php header ("Content-Type: text/html; charset=windows-1251"); ?>
having the same fun problems myself :-)
January 4th, 2005, 02:27 AM
I have same problem with ASP, please tell me how to solve this problem in ASP Page.
Thank You !
July 17th, 2012, 04:07 AM
You must put the next row after the connection row:
Then you put in the head of your HTML page this row:
<metahttp-equiv="Content-Type" content="text/html; charset=utf-8">