Advanced Search

Results 1 to 7 of 7

Thread: encoding of pages loaded using dynamic ajax content script

  1. #1
    Join Date
    Nov 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default encoding of pages loaded using dynamic ajax content script

    1) Script Title: Dynamic Ajax Content

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

    3) Describe problem:

    I've implemented this script in a calendar on my site, but I have problems with the encoding of the ajax-loaded pages (it's a specific greek encoding, not utf8). The strange thing is that it works great on Chrome, but IE and Firefox give this encoding issue.

    Here's a link to the calendar:

    http://1062943144.n82093.test.prosit..._front_end.asp

    The first time the page is loaded, it doesn't use the ajax script so everything is fine in all browsers. But when the user clicks on the arrow buttons to switch between months, the page is re-loaded in the div using the ajax script and the greek month in the calendar doesn't show up correctly (in IE and Firefox).

    Any idea how I can solve this issue?

    Thanks.

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,622
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    The very first thing I would do is double-check that you can't use UTF8 for everything. AFAIK, UTF8 covers *everything*.

    Failing that, you need to get everything (the page and the ajax'd text) using the same charset, and make sure your server is sending the correct HTTP header.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  3. #3
    Join Date
    Nov 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok, thanks a lot

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    You can certainly use UTF8 for Greek. UTF16 may be required for particularly unusual characters, or some characters in Chinese, but not really for anything else.
    Unless you're specifically in a situation where you know a lot about character encodings and are trying to do something unusual, you should be just fine with UTF8.

    Note that you will need to convert your content. Sometimes this can be easy. Other times it might require manual cutting and pasting, or even some sort of more complicated conversion. Usually it works out fine, but sometimes it can be a little tricky.


    Quote Originally Posted by traq
    AFAIK, UTF8 covers *everything*.
    I thought the same. But John corrected me-- UTF16 is required for some characters in Chinese and a few other things. It's also used for newer things that are added to unicode, but those are so rarely relevant it shouldn't matter. As a practical matter, it probably does cover everything unless you're dealing with Chinese (and other Asian languages with those characters).
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    There has been a discussion on this elsewhere on the forums:
    http://www.dynamicdrive.com/forums/s...F-8-with-HTML5
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  6. #6
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,297
    Thanks
    28
    Thanked 135 Times in 130 Posts
    Blog Entries
    28

    Default

    If nothing helps and you don't know what to do anymore, you can always use this.
    It automatically converts any given alphabetic character to its HTML-entity counterpart. So, for instance, inputting Δ yields & # 9 1 6 ;.
    I do this all the time for French. It's a habit you'll get rapidly accustomed to.
    Arie.

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,881
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    One for the bookmarks! Thanks Arie
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Similar Threads

  1. Dynamic Ajax Content not loading jquery on pages being loaded
    By cmccarra in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-21-2010, 01:42 PM
  2. Dynamic Ajax Content, problem with encoding..
    By eternal2000 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-08-2008, 05:45 PM
  3. Dynamic Ajax Content with encoding
    By deksab in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 04-12-2007, 03:58 AM
  4. Dynamic Ajax content : TinyMCE script into loaded page
    By HyperCyber in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 12-14-2006, 10:14 AM
  5. Replies: 2
    Last Post: 11-20-2006, 11:36 PM

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
  •