SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast asbali's Avatar
    Join Date
    May 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Foreign language (Turkish) text doesn't display correctly: PHP and AJAX

    I have created a page that uses a server side AJAX request to include a php page to display some text in Turkish.

    The included page is: http://tr.musikdebu.com/get_tr_text.php
    It displays the Turkish text with the additional charcters found in the Turkish language (ç ö ü etc) when typed into the address bar of the browser. The lead me to believe the problem is not PHP.

    the including page is: http://tr.musikdebu.com/test.htm

    For this example this page has two sections. 1) a navigation menu displays text in Turkish by including a html file: http://tr.musikdebu.com/top_nav_menu.htm
    This text displays fine use AJAX HttpRequest. This lead me to believe the problem is with PHP.

    2) a body section that inlcudes the the php via AJAX HttpRequest.
    This section doesn't display the Turkish characters correctly. Some of the charaters appear as question marks (?).

    So no I'm perlexed. Can anyone point me in the right direction to resolve this issue?

  2. #2
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It could be for you much more better to include xml file, because in that case it takes defined charset. I have made small example with my laguage here http://xy.wz.cz/ajax-simulace-include/ , it load small xml instead of html. See the xml example http://xy.wz.cz/ajax-simulace-include/javascript.xml code, with html this not works. You could do it also with php, in case that you send a correct charset in header.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •