Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Robert Latest Newsgroups: comp.lang.php Subject: PHP, MySQL and UTF-8? Date: 12 Sep 2011 16:46:13 GMT Lines: 23 Message-ID: <9d6ralFrpkU1@mid.uni-berlin.de> X-Trace: news.uni-berlin.de HJQadOQDNlD31TUPji3DSAsG2KmG0+5kXs1IqWpknjPFwrt0s= User-Agent: slrn/pre1.0.0-18 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:3128 Hello all, I have UTF-8 characters in my database. They're there, I can see them in a MySQL dump as well as in phpmyadmin. When I retrieve this data from the db and output it via print(), all I get is question marks. These come from the server because I see them also in wget's output. In phpmyadmin I see the correct characters in my db. When I insert them literally in my HTML they come out as expected. When I print() them as string literals in php, they come out correctly as well. I think I'm opening the db correctly: $c = new PDO("mysql:host=$host;dbname=$dbname;port=$port;charset=UTF-8", $user, $pass); So ... how do I retrieve UTF-8 chars from a database? Thanks robert