PHP reads two TXT files differently

1

I have two txts files, I used notepad ++ to make the text.

PHP, reads a normal file with the word TITLE, but the other one appears T? ULO.

Does anyone know the reason, or how to fix this problem?

    
asked by anonymous 04.05.2015 / 15:46

2 answers

4

@AleMoraes, open the three files in notepad ++ (2 txt and the .php file) and go to the formatar menu button and select the option: Codificação em UTF-8 (sem BOM)

    
04.05.2015 / 15:52
5

They are probably with different encoding. In notepad ++ you can see the encoding of the file and even change it.

Eventually one of them is in UTF8, and another one in latin1, ascii, or the like.

    
04.05.2015 / 15:53