Is there a way to write words the way they are, with their accents?
In php, just use:
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
Informação must be written
Is there an alternative?
Set up your text editor (notepad ++, sublime, etc.) to save edits as UTF-8 or charset that you find most appropriate for you.
It is recommended to use a multibyte character set such as UTF-8 (No BOM).
Loading .js files
When loading a JavasScript file, it is also recommended to specify the charset used:
<script src="file.js" charset="utf-8"></script>
Specify the meta tag
In HTML, obviously specify the meta tag:
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
The entire environment should be well configured.
If you are using PHP , specify the header:
header('Content-Type: text/html; charset=UTF-8');
<meta> tag is unrelated to PHP. It’s from HTML.
This answer addresses the use of UTF-8, however, it does not necessarily mean that it is the best form or final solution. Using UTF-8 is a recommendation to make your application’s charset internationalized because UTF-8 supports multibyte characters.