Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3132
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: PHP, MySQL and UTF-8? |
| Date | 2011-09-12 15:30 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <j4lmk6$gl0$1@dont-email.me> (permalink) |
| References | <9d6ralFrpkU1@mid.uni-berlin.de> |
On 9/12/2011 12:46 PM, Robert Latest wrote:
> 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
What version of PHP are you using?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PHP, MySQL and UTF-8? Robert Latest <boblatest@yahoo.com> - 2011-09-12 16:46 +0000
Re: PHP, MySQL and UTF-8? Jerry Stuckle <jstucklex@attglobal.net> - 2011-09-12 15:30 -0400
Re: PHP, MySQL and UTF-8? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-09-12 14:31 -0500
Re: PHP, MySQL and UTF-8? "A" <a@a.a> - 2011-09-12 22:27 +0200
Re: PHP, MySQL and UTF-8? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-09-13 16:53 +0200
csiph-web