1

I seem to be missing something very basic, so I've simplified my code to show the issue.

In my controller I set a variable that would be a description of a product:

controller: function ($scope) {
  $scope.someProduct = "someBrand ® productName";
}

In my view I then display the product with:

product: {{someProduct}}

In the browser though this appears as "product: someBrand ® productName"

Any idea why it is prepending the '®' with 'Â' and how to stop it from doing that?

I'm using UI Router, UI Utils and UI Bootstrap in addition to AngularJS if that information helps.

1 Answer 1

2

Check if your editors saves the content at the same encoding as browser thinks the file is encoded in. Probably your editors saves the file as latin-1 (or something similar) and the browsers threats the file as UTF-8.

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

2 Comments

I just forced the save as UTF-8 with notepad on the js file and it worked! I really didn't expect VS2013 to mess up my encodings! Thanks. Any idea offhand how to make VS always use UTF-8 encoding for js files?
Editors usually pick op the platform prefered encoding, unfortunately that is latin-1 in most cases. Some editors have a general setting to override your platform encoding.

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.