I am receiving some data from web server with unicode characters as below:-
> á à é è í ì ò ó ù ú
I am using below line for setting value:-
this.myForm.get(‘Description’).setValue(data.Desc);
If I am going to set value using below:-
> <ion-textarea value="{{data.Desc}}">
this is not working because in validation I set below:-
Description: new FormControl('', Validators.required)
How can use [innerHTML] here?
How can I show this properly?
Those are HTML entities, not Unicode characters.
á = Unicode character
á
= HTML entity that is supposed to render as á
My recommendation is “don’t”. HTML is a bad choice for a transfer format, and your issue is one reason why.
Why can’t your server simply send the underlying characters? JSON is perfectly capable of handling Unicode:
{ “foo”: “á à é è í ì ò ó ù ú” }
@rapropos , Thank for reply!
I checked with the server guy he said that they can not send unicode characters.
So I need to deal with HTML entities.
Now please suggest any solution if you have.