1

I have an issue with my web application.

I'm using AngularJs v1. When I'm wrinting

In my index.html I have :

<meta charset="utf-8" />
[...]
<button class="btn btn-success">Enregister les préférences</button>

I have this render on my browser (chrome or firefox) :

Enregister les préférences

But, with the same in my template HTML which replace the ng-view, I have :

Enregister les pr�f�rences

How to extends the charset of index.html to ng-view ?

Thanks.

1
  • Look at the actual HTTP request and the Content-Type header that the template is being served with. Commented Jul 8, 2016 at 12:56

3 Answers 3

1

If you add meta tag for each of the template HTML, then it works. For ex. below code

  <head>
  <meta charset="utf-8">
  </head>

However I think your question is about inheritance of meta tag inside template html. Not sure if its supported by w3

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks :) it's working even if I think like you about w3c
0

You can specify language

<html lang="en">

or

Check these links

2 Comments

Thanks. html lang doesn't working. It's odd to must using i18n for this issue.
lang designates the human language of the content, not the charset encoding of the document. The latter is clearly the problem here, not the former.
0

I had the very same problem in an Angular app. In my case I needed to do the following sequence:

1. Add meta tag for UTF-8:

<head>
    <meta charset="utf-8" />
</head>

2. Open the html file e.g. in Notepad++, select all text and and convert it to UTF-8 without BOM (if there are other files connected with this html e.g. .css, .js or .tss do the same with them)

3. Restart your IDE (in my case VS2017) because your files might be cached and rebuild the project:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.