maddogandnoriko Posted April 14, 2009 Share Posted April 14, 2009 I am building a Television site and have imported an xml page into a simple xml object and put the results into an sql table. My problem is with the "ö" character, although I suspect it will affect other similar characters. When I get the result from the db it is not "ö", but is "ö". I suspect it is my db setup as the row it is in is set to latin1_swedish_ci collation. Should it be something else? I know strictly this is not a php question but sql and php are so closely linked I figured someone here would be able to answer this. Thank you for your time, maddogandnoriko Quote Link to comment Share on other sites More sharing options...
maddogandnoriko Posted April 14, 2009 Author Share Posted April 14, 2009 I manually inserted the ö into the db row, so I do not think it is a db problem. Quote Link to comment Share on other sites More sharing options...
maddogandnoriko Posted April 14, 2009 Author Share Posted April 14, 2009 I am sorry. My problem occurs much earlier than inserting it into the db. Could someone point me in the direction of an article or tutorial for working with these types of characters? Thank you maddogandnoriko Quote Link to comment Share on other sites More sharing options...
maddogandnoriko Posted April 14, 2009 Author Share Posted April 14, 2009 It is happening when I import it into the xml object, I think. Sorry to have muckec this thread up so bad...... For this xml url:http://www.thetvdb.com/api/GetSeries.php?seriesname=krod The xml: <Data> − <Series> <seriesid>88631</seriesid> <language>en</language> <SeriesName>Kröd Mändoon and the Flaming Sword of Fire</SeriesName> <banner>graphical/88631-g2.jpg</banner> − <Overview> The series follows a reluctant hero named Kröd Mändoon. The often underconfident freedom fighter is the last great hope in the struggle against an evil ruler known as Chancellor Dongalor. To help in his fight, Kröd has assembled a band of remarkably useless fighters. Together, they must overcome a variety of evil obstacles in a quest to save their world. </Overview> <FirstAired>2009-04-09</FirstAired> <id>88631</id> </Series> </Data> the simplexml object(as print_r'd): Array ( [series] => Array ( [seriesid] => 88631 [language] => en [seriesName] => Kröd Mändoon and the Flaming Sword of Fire [banner] => graphical/88631-g2.jpg [Overview] => The series follows a reluctant hero named Kröd Mändoon. The often underconfident freedom fighter is the last great hope in the struggle against an evil ruler known as Chancellor Dongalor. To help in his fight, Kröd has assembled a band of remarkably useless fighters. Together, they must overcome a variety of evil obstacles in a quest to save their world. [FirstAired] => 2009-04-09 [id] => 88631 ) ) Quote Link to comment Share on other sites More sharing options...
waynewex Posted April 14, 2009 Share Posted April 14, 2009 Seems like you have a problem with your charsets. Quote Link to comment Share on other sites More sharing options...
maddogandnoriko Posted April 14, 2009 Author Share Posted April 14, 2009 Yeah...how do I go about fixing that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.