Download file using angular - other character encoding in db and html

252 views Asked by At

I saving data in database(sql server) using Latin1. My html application uses utf-8 encoding.

Server side is wrote in c# using WebApi.

When I try to download file from db which contains word ' 123' in txt file:

$http.get<string>(url).success(data=> console.log(data);

I get this: �123 After use this

unescape(encodeURIComponent('�123'));

I get "�123"

How can to convert returned string from server to proper one ?

0

There are 0 answers