PHP reads two Txts files differently

Asked

Viewed 91 times

1

I have two txts files, I used Notepad++ to do the text.

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

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

  • 3

    Enter source code, a possible cause maybe encondig.

2 answers

5

They are probably encoding differently. In Notepad++ you can see the encoding of the file and even change it.

Eventually one of them is in UTF8, and the other in latin1, ascii, or something like that.

4


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

  • That’s it!!! kkkk, I thought your "NO GOOD" was slang, kkk. What is this "GOOD"? Valeu man.

  • 1

    @Alêmoraes depends on the scenario in this particular means: BYTE ORDER MARK check here a document explaining http://www.w3.org/International/questions/qa-byte-order-mark

  • 1

    @Elements in the context of HTML would be: Browser Object Model

Browser other questions tagged

You are not signed in. Login or sign up in order to post.