Cyrillic Support. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Cyrillic Support.

MihailVDMihailVD Posts: 91Member
Hello everyone. I have a problem with ajax. When I try to display
a cyrillic HTML page in a DIV in another HTML page through AJAX, I see
it as question marks.
Does anyone know what I must do to get it right?
---------------
Mihail Dimitrov
ICQ : 110064098

Comments

  • JonathanJonathan Posts: 2,914Member
    : Hello everyone.
    ??????. :-)

    : I have a problem with ajax. When I try to display
    : a cyrillic HTML page in a DIV in another HTML page through AJAX, I
    : see it as question marks.
    : Does anyone know what I must do to get it right?
    I assume you can see the cyrillics in your browser normally? If so, that suggests it's not a font problem, so my guess is that somewhere along the line the string containing the cyrillics is being "downgraded" to just an ASCII string rather than a unicode one. Figuring out where that happens should give you a clue. What technology are you using on the server side? Can you set a breakpoint in the code that delivers the cyrillic HTML page and see what the string looks like there?

    Jonathan
    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • JonathanJonathan Posts: 2,914Member
    : : Hello everyone.
    : ??????. :-)
    :
    Uh, that was supposed to be the cyrillics for privyet, but looks like our unicode support here at PH is screwed up too. Dammit. Well, at least you're not alone...

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • MihailVDMihailVD Posts: 91Member
    : : : Hello everyone.
    : : ??????. :-)
    : :
    : Uh, that was supposed to be the cyrillics for privyet, but looks
    : like our unicode support here at PH is screwed up too. Dammit. Well,
    : at least you're not alone...
    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

    Hmm ... see what I mean? :)
    Well, I really tried to put break lines in some key places in the code,
    but the break lines go fine till the text reaches our container - the DIV.
    The code goes like this:
    We have an HTML page with the DIV element, that is supposed to contain the
    sub-page. In the main page, we have the JavaScript code, that calls
    the XMLHttp Request to HTML page, returns it in .responseText and displays
    it in the DIV then. When the sub-page is displayed in the DIV, it goes
    "???? ...".
    ---------------
    Mihail Dimitrov
    ICQ : 110064098
  • mirobgmirobg Posts: 1Member
    : Hello everyone. I have a problem with ajax. When I try to display
    : a cyrillic HTML page in a DIV in another HTML page through AJAX, I
    : see
    : it as question marks.
    : Does anyone know what I must do to get it right?
    : ---------------
    : Mihail Dimitrov
    : ICQ : 110064098

    I had the same problem and I resolved it by using the php function htmlentities(): htmlentities('cyrillic_string',ENT_NOQUOTES,'cp1251');

Sign In or Register to comment.