Re: UTF-8 and question marks



I set content type to UTF-8 using META tag. In response header the
browser gets only "Content-Type: text/html".

However, I think that the problem isn't in content type. I can type
UTF-8 encoded text between HTML tags and it is displayed correctly in
browser. I can also use "echo 'some UTF-8 encoded text';" and all is OK
again. But if I read a string from database and try to echo it I get
only ??????.

I use these lines to read from database:
$res = mysql_query($query);
$row = mysql_fetch_assoc($row);

Sorry, but I haven't yet uploaded my page to a public web server.

.



Relevant Pages

  • Re: Response.redirect inside a Timer Event
    ... Many thanks for your gelp Mark, but I afraid that it doesn't work. ... it will insert a value on a database. ... code is rewritten for the external server, so the meta tag disappear and I ... Set the page inside the iframe to refresh itself using the meta tag ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: utf-8 data
    ... Create the tables in the database to store the TEXT as UTF-8. ... Deliver your HTML documents in UTF-8 encoding by setting the right headers in PHP (Header, not META tag, allthough it is wise to set the META tag too. ...
    (comp.lang.php)
  • Re: utf-8 support in libc?
    ... language) it doesn't matter how the database is encoded, ... I'm not sure if that is a BSD issue or a Postgres issue for not taking advantage of the BSD functions properly. ... there is no collation support for UTF-8 on those platforms. ... locale you initdb with is a UTF-8 locale. ...
    (freebsd-stable)
  • Re: national characters not printed
    ... I have configured MySQL and PHP5. ... I have created 'books' table in test ... database with utf-8 set for database and table. ... utf-8 compatible and also your html must set to utf-8. ...
    (comp.lang.php)
  • Ubuntu encodings
    ... Looking at the database setup I found all the databases had been created ... with UTF-8 encoding, although I do not recall any indication in the ... setup or configuration that implied or stated that UTF-8 was going to be ... Ubuntu chooses UTF-8 as the default, ...
    (Ubuntu)