SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML in ISO-8859-1 and DB in UTF-8

    I have the page coded in ISO-8859-1 and the database is using UTF-8, because it doesnt have the ISO-8859-1 option.

    So the result is that the page text appears right, but everything that comes from the database stays like this: Multimédia, where it should be Multimédia.

    How can i solve this? Changing the page's to UTF-8 is not the solution because the all page is coded in ISO-8859-1.

    How can i convert the SQL data to ISO, or change the database to ISO?

    I tried this trought SQL but didnt work:

    PHP Code:
    SQL:

    ALTER DATABASE legaliza2 COLLATE ISO -8859 -1


    #1273 - Unknown collation: 'ISO' 

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you'll find what you need: http://tlug.dnho.net/?q=node/276
    But you need it the other way around.

    You wouldn't have to use ISO-8859-1, you need to use latin1 or something of that kind.
    FOR SALE: 1 set of morals, never used, will sell cheap

  3. #3
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cant do that, my server isnt a dedicated server.

    I'm hosted in Godaddy's servers so by default their DB are using UTF-8.

    The only way to solve this is using php to convert data from utf-8 to ISO or convert all my html text to utf-8 (without using the headers, because if i use headers characters like à á é è are lost).

    I have PHPbb forum in my server, and i see that its Database is in UTF-8, and the page result is in ISO, and there are no problems with accents.
    How does he do that?

  4. #4
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •