How to fix the character set (charset) issue


I tried adding the “AddDefaultCharset off” line as well, and it seems to be a better alternative, especially if the charset to be used already is specified in the html files.


AddDefaultCharset off - worked for me as well.
I suggest this thread be moved back out of tutorials, and a new tutorial thread be started.


Tutorial updated.

Thank you all for your suggestions! :smiley:


Hello!. My site its in spanish too, and currently im experience the same problem.
I see my site doesnt show correctly the letters, i go to edit the files to correct those letters, save and exit, and then everything seems ok on my site. But if i go to edit the file again to modify or add something to my site, i see that the letters with accents have changed again, so i have to correct every letter every time i edit the html files.
Thats really annoying

I already tried the htaccess file method (file didnt exist so i created and added that line), but the html files keep changing every time i open to edit them.


TP77, el problema del idioma español me tuvo de cabeza varias semanas. Te digo como lo solucioné:

Solucionando problemas en la migración de 000webhost

1.- En primer lugar, no usar el nuevo “File Manager” del panel de control para subir o editar archivos, los corrompe.
Hay que usar un programa de FTP externo para bajar los archivos al PC, como Filezilla, yo uso WS_FTP95 LE.
Luego, se pueden editar y subir de nuevo, siempre con FTP externo.
Hay que transferir archivos en modo ASCII, no en BIN, porque se corrompen.

2.- No hay caso de que se muestre correctamente el idioma español, no importa que código html se use.
Para solucionar el problema del español, hay que modificar el archivo .htaccess (así se llama), agregar esta línea al final:

AddDefaultCharset off

Repito, NO USES FILE MANAGER PARA EDITARLO, bájalo a tu Pc, edítalo, y luego lo subes, por FTP externo.

Espero que soluciones el problema, saludos.

Mi sitio:


Although “AddDefaultCharset off” worked for .htm files, it did not work on a .php file.
For this adding <?php header(“Content-Type: text/html; charset=ISO-8859-1”, true); ?> to the <head> section of the .php file worked.


I forgot to mention that. Thanks! :slight_smile:


It’s not working for me too in html files. I’m using dhivehi language on my site. Any idea how to fix it?


dhivehi is supported by UTF-8. You shouldn’t have to change anything in your document :confused:


Perfecto, al final es la mejor solución.

Muy buena tu página web.
Mi página:


hi, is there someone who could help me?
i’ve tried all solution you have proposed here but it don’t worked for me.
i’m using codeigniter, my files have .php extension.


Still. When i save it it works fine. But when i try to edit a portion of the document and save it again, rest seems sjdjdhajbshxebdjsb. Idk what to do. Any idea?


Did you edit your document in File Manager? File Manager is known to having issues saving files with unusual encodings.

Please avoid using it if you want to edit files with non ASCII encoding.


Je ne comprends pas pourquoi je reçois ces courriels


If you have tried all solutions, maybe your document has been saved in raw mode. Have you been using File Manager to edit your document?

@pollaris I am sorry, could you please rephrase that? :slight_smile:


me funciono con esto .htaccess
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
AddDefaultCharset off

y en el php o html esto
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>

como sale en tu pagina

use winSCP Y notepad++