AJAX

Moderators: None (Apply to moderate this forum)
Number of threads: 61
Number of posts: 110

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Cyrillic Support. Posted by MihailVD on 31 May 2007 at 1:40 AM
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
Report
Re: Cyrillic Support. Posted by Jonathan on 31 May 2007 at 2:06 AM
: 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.");
Report
Re: Cyrillic Support. Posted by Jonathan on 31 May 2007 at 2:09 AM
: : 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.");
Report
Re: Cyrillic Support. Posted by MihailVD on 1 Jun 2007 at 11:24 PM
: : : 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
Report
Re: Cyrillic Support. Posted by mirobg on 29 Jun 2007 at 5:48 AM
: 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');




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.