Marvin Medeiros
Marvin Medeiros

Reputation: 252

Jade issue with accentuation encoding

I'm trying to write some words in portuguese inside my .jade template but the result is not as i expected:

.jade template

h1 Portfólio

See the problem:

<!-- The result that i expected -->
<h1>Portfólio</h1>

<!-- The result that comes -->
<h1>Portfólio</h1>

How can i fix this issue? I can't find anything about in the docs.

Upvotes: 0

Views: 118

Answers (1)

noisypixy
noisypixy

Reputation: 774

This is not a problem of Jade itself (recently renamed to Pug).

The Jade/Pug output (and probably the input as well) is encoded in UTF-8, but whatever program you're using to read it is interpreting it as ISO-8859-1.

Assuming you're using a web browser to read it, this problem should be fixed after declaring the character set inside the head of the document.

doctype html
html
  head
    meta(charset='utf-8')
  body
    h1 Portfólio

Upvotes: 1

Related Questions