Results 1 to 3 of 3

Thread: Retrieving test from mysql as "�"

  1. #1
    Join Date
    Jan 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Retrieving test from mysql as "�"

    Im a noob with php,
    but certain texts on my website shows up as �, and idk why! I heard it has to do with encoding, but im not sure what that is or how to fix it

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    are you writing the text or code in a text editor or ms word or something. The symbol is cause the browser is getting a character encoding and the symbols in the text do not have a html equivalent in the encoding that was given. You should be able to know what the actual symbols should be and you could simply replace those with their html equivalents and then they will show properly.

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Somewhere in the system, the character encodings do not match. Your MySQL table encoding and your HTML encoding are the most likely problems. Change one or the other to match and it should be fixed. Note that this may not fix your existing data, but it will make it work for the future. For existing data, it may be very difficult to fix but you can try to convert between encodings if you can read it anywhere (such as PHPMyAdmin?) correctly.

    The first step is to make sure that you have a meta tag setting the character encoding in your HTML.
    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

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
  •