0

hello i have such output from php

????????? ??, 29/06/2014 - 17:50
!username
???????????? ????????:

    --?????? ? ????????????? ??????????--
    ??????????

i try echo utf8_decode($text);, echo iconv('ASCII', 'UTF-8//IGNORE', $text); SHOW GLOBAL VARIABLES LIKE 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+

can some one help me with my problem. Thank you.

Mike Minaev
  • 1,912
  • 4
  • 23
  • 33
  • Try this:- Add this on the top of your document header('Content-Type: text/html; charset=utf-8'); – DWX Jun 30 '14 at 09:51

1 Answers1

0

You need to run just after connecting with MySQL the following query:

SET names='utf8'

before you make any other queries.

I don't know what method of connections you use but it may be for example:

mysqli_query("SET NAMES 'utf8'");
Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291