#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0

    Outputted cyrillic text is displayed wrong


    Hello,

    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:

    Code:
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1251">
    Thank you very much for your answers.

    Greetings, Dominik
    Attached Images
    Last edited by Slain84; March 30th, 2004 at 10:14 AM.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    1
    Rep Power
    0
    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 :-)
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    1
    Rep Power
    0

    Asp


    I have same problem with ASP, please tell me how to solve this problem in ASP Page.

    Thank You !
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    0
    You must put the next row after the connection row:
    mysqli_set_charset($this->link, "utf8");
    Then you put in the head of your HTML page this row:
    <metahttp-equiv="Content-Type" content="text/html; charset=utf-8">

IMN logo majestic logo threadwatch logo seochat tools logo