Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts

    Problem in validating page with unicode text

    Hi friends,

    I've been building a site in php+mysql as backend and most of the contents in the site are in local language(malayalam), so I opted unicode to store and display them.

    My dream is to display a 'w3c valid' symbol and i'm struggling on it.

    Now,my problem is some of my unicode text shows an error on validation (these texts are stored in database as unicode)

    For a demo of my problem I've uploaded one of my page with only one such content shown (commenting php loop)

    please have a look at it, all the links are not working as its only a demo.

    http://trials.casemumbai.com/trials/MySongs.htm

    This particular item shows 2 errors and if i remove the php-comment, there are 20 items and which results around 27 errors, all are due to this unicode.

    These items are compiled by a rich text editor provided in the html form.

    Can I make my dream true? or can i place a 'w3 icon' even if there are errors like this?

    thanks n regards,
    art.

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Two PHP functions you should look into are htmlspecialchars() and htmlentities.


    I personally wouldn't put up a W3C validity badge unless I was certain that the page was, and would stay, valid. I personally wouldn't put up a badge either way (although a I value code validity highly), but I appreciate that there are some fair reasons to promote the fact that a site is standards compliant on-page.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Thanks Bill,

    I tried the two functions

    and then i tried
    Code:
    utf8_decode()
    also, but no progress yet.

    I've some other pages with more content , and amazingly they validates successfully.

    One example is http://trials.casemumbai.com/trials/About.htm

    The only difference is this content was placed statically in the document.

    but i don't think it's due to this since I've other pages which takes content from database and validate correctly.

    any other clues?
    Last edited by abduraooft; 05-24-2007 at 03:08 PM.


  •  

    Posting Permissions

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