-1

i try to print this word,

echo "AUTO DETENÇÃO"

but the output is AUTO DETENÇÃO . This word is Portuguese.

Akbar
  • 53
  • 1
  • 8
  • 1
    Have you checked the output encoding? – Sirko Jul 02 '13 at 09:35
  • i have read thats question ,,,[http://stackoverflow.com/questions/279170/utf-8-all-the-way-through]. this is what i do, `` but the result always like this AUTO DETENÇÃO. – Akbar Jul 02 '13 at 10:06

3 Answers3

1

Looks like your script file is saved as utf-8 but the data is sent to the client as if it was iso-8859 (or similar) encoded.
try

ini_set('default_charset', 'utf-8');

in your script before any output is sent to the client.
Then PHP will send an http response header that informs the client about the utf-8 encoding.

VolkerK
  • 95,432
  • 20
  • 163
  • 226
1

Be sure your encoding is set to a proper option for your language like UTF-8:

<?php header('Content-Type: text/html; charset=utf-8'); ?>
Th3Alchemist
  • 1,161
  • 2
  • 13
  • 25
0

A good solution is to change the unicode to UTF-8 encoding . I think you are using some other type of encoding .

          <?php

          ini_set("default_charset", "utf-8");

          ?>

If you are saving Portuguese word with your script, Select UTF-8 encoding while you save the document.

Jijo John
  • 1,375
  • 9
  • 21