Results 1 to 7 of 7

Thread: Ajax Tabs Content script - Turkish Characters Prtoblem :(

  1. #1
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Tabs Content script - Turkish Characters Prtoblem :(

    1) Script Title: Ajax Tabs Content script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/index.htm

    3) Describe problem: thanks to everybody who has writed that script. its very nice script but i have a problem.
    i am including a .asp page to the script :
    <li><a href="xx1.asp" rel="ajaxcontentarea">Title1</a></li>
    like that and in the xx1.asp file it has Turkish characters like (ç,ü,ş,ı)
    when i run the script it doesnt support turkish caracters and changes them to the (?) . example;
    it writes : fenerbahçe
    but its shown : fenerbah?
    like that.
    thanks again

  2. #2
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can use this!
    Put it in the<head>tag
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO 8859-9">
    now the encoding is turkish!

  3. #3
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for the answer but i put that before but it didnt changed my problem.
    i solved that problem with a ascii characters, if you write the ascii code of the character its good than. example;
    &#xf6; for "&#246;"

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by yubon
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO 8859-9">
    now the encoding is turkish!
    It isn't, for two reasons. The first is that the encoding is specified incorrectly: it should be "iso-8859-9" (you omitted the first hyphen). The second, and more significant, is that a meta element in the calling document has no effect whatsoever on processing an AJAX response.

    As I understand it, without information to contrary, browsers will assume that the contents of a response is encoded using UTF-8. US-ASCII (7-bit) and UTF-8 documents will be interpreted correctly, but there are no guarantees for anything else. The only effective way to change this is have the server send a Content-Type header containing a charset parameter, though it's probably better to stick to UTF-8 or 7-bit ASCII.


    Quote Originally Posted by kramp
    i solved that problem with a ascii characters, if you write the ascii code of the character ...
    You mean a character reference that specifies a Unicode code point. ASCII only contains 128 characters, which includes Latin letters (a-z), numbers, basic punctuation, and 33 control characters (0x00-0x1f, 0x7f).

    Be aware that using a character reference only works if the data is later processed as HTML or XML.

    Mike

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by kramp
    thanks for the answer but i put that before but it didnt changed my problem.
    i solved that problem with a ascii characters, if you write the ascii code of the character its good than. example;
    &#xf6; for "ö"
    mwinter's right that won't work unless the data is later parsed as XML or HTML but, usually it is. Sometimes though, this is not enough. The javascript entity might work in those situations:

    \xf6
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    The javascript entity might work in those situations:

    \xf6
    Escape sequences (entity is a markup term) are only recognised as such in string literals. If that were included in a response to an AJAX request, the responseText string would contain precisely those four characters.

    Mike

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by mwinter
    If that were included in a response to an AJAX request, the responseText string would contain precisely those four characters.
    That's the idea. If the response text isn't going to be parsed as HTML or XML, it may very well be parsed as javascript. If that were the case, you would want the escape sequence not the entity. If it is parsed as HTML, it should still be rendered as hoped for:

    Code:
    <div id="tt"></div>
    <script type="text/javascript">
    document.write('\xf6');
    document.getElementById('tt').innerHTML='\xf6';
    </script>
    Both of these produce the same result on the page. The Ajax Tabs script uses the response text as the target element's innerHTML.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •