strange characters keep showing up in db

Discussion in 'MySQL' started by billybrag, Oct 31, 2005.

  1. #1
    strange characters keep showing up in db

    Hi all i am using a mysql database to run a script i found on the net, and strange things keep happening

    The £ sign kees changing to either a ? or it adds a strange looking A to the front of it.

    Any ideas what might cause this

    Mike
     
    billybrag, Oct 31, 2005 IP
  2. dkalweit

    dkalweit Well-Known Member

    Messages:
    520
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    150
    #2
    Some kind of code page/high ascii/unicode issue... Sorry I have no details on how to fix your problem, but this is most likely the root cause of it.


    --
    Derek
     
    dkalweit, Oct 31, 2005 IP
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you see something like Â, then your application is pulling the £ symbol from the database in UTF-8, but your page is displaying it as something else. Changing your charset to UTF-8 should fix this problem:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    J.D.
     
    J.D., Oct 31, 2005 IP
  4. billybrag

    billybrag Peon

    Messages:
    324
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i have tried that but i think the problem is that the DB is outputting something that is not utf-8 ie things like � instead of £

    please help
     
    billybrag, Nov 2, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Can you copy and paste these characters? Also, try connecting to MySQL from the console and select the record that contain these characters. Paste here the characters you get back.

    J.D.
     
    J.D., Nov 2, 2005 IP