Dario M.
Dario M.

Reputation: 425

angularjs not showing International Accent Marks and Diacriticals

I have a problem with my app, which i made with cordova apache and angularjs. The problem is, that the International Accent Marks and Diacriticals not showing correct. There is a problem with "à" all other Html codes showing up correctly!

When I showing the following text :

C'est tout à fait juste.

it comes out like this :

C'est toutagrave; fait juste.

But it should be like this :

C'est tout à fait juste.

There is only a problem with the à!

This is my code:

 <div class="learnBox" ng-show="view.learnData.VisibleSetting.ShowQuestion" ng-bind-html="view.learnData.Card.FrontText | unsafe"></div>

And in the app.js I have:

   app.filter('unsafe', function ($sce) {
    return $sce.trustAsHtml;
});

Does someone know this problem? How can I solve this?

Thanks

Upvotes: 1

Views: 169

Answers (3)

Dario M.
Dario M.

Reputation: 425

For me this solution worked:

var elemfolderName = document.createElement('textarea');
elemfolderName.innerHTML = "C&#39;est tout &agrave; fait juste.";
var  folderName = elemfolderName.value;

And then I save folderName to sqlite3 db...

Upvotes: 0

Dario M.
Dario M.

Reputation: 425

The problem is not angularjs it is sqlite. It cut of from $agrave; the $ when i save it to db.

Upvotes: 0

V&#237;ctor
V&#237;ctor

Reputation: 3039

The difference is that you are using UNICODE HTML in &#39;

But you are using html in &agrave;

If UNICODE is working well, use &#224; instead of &agrave;

Upvotes: 1

Related Questions