1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem inserting special characters

Discussion in 'Databases' started by Triexa, Jan 14, 2007.

  1. #1
    I am using PHP... I have a form, and one value is:
    ÄŒasto, dennÄ› nebo obden

    when I echo the $_POST to the page, everything shows up as expected, but once I insert it into the database it converts to:
    ?asto, denn? nebo obden

    However, another value is:
    Už si nepamatuju

    and it gets inserted properly:
    Už si nepamatuju

    Why do some characters get converted to question marks while others do not? How do I make ALL of them work!?
     
    Triexa, Jan 14, 2007 IP
  2. sukantab

    sukantab Well-Known Member

    Messages:
    2,075
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Although I am not sure, but I think if you change the language type/characterset in your database From UTF-8 to your language, then this might be fixed.
    The reason is in default characterset doesn't contain that character.
     
    sukantab, Jan 15, 2007 IP
  3. phantomddl

    phantomddl Well-Known Member

    Messages:
    2,856
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    160
    Articles:
    15
    #3
    all you need to do is to go to phpmyadmin and choose UTF-8
    i think thats the problem :)
     
    phantomddl, Jan 15, 2007 IP
  4. cellularnews

    cellularnews Peon

    Messages:
    246
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I tend to rewite all non-latin1 characters to their unicode equivalents - ensures they display correctly when rendered by web browsers as well.
     
    cellularnews, Jan 15, 2007 IP
  5. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    nevermind got it... stupid me, indeed I hadn't set the character set to utf8 on one specific table :(
     
    Triexa, Jan 15, 2007 IP