JSON must ALWAYS be UTF-8. It is defined in the standard. So, the issue starts with whatever logic is generating the data you are posting. For example: if you are using JSON.stringify(), then you are sending UTF-8 but telling the server it is ISO-8859-1, which is incorrect.
UTF-8 does everything ISO-8859-1 does. So, it is perfectly safe to transmit UTF-8. If you need to store ISO-8859-1 on your backend (in your PHP), you will need to convert it. Hope that helps. On Mon, Aug 29, 2016 at 10:25 AM Victor Souza <[email protected]> wrote: > > Hi , I'm trying to change the appropriate charset for my language but is > not working, some special characters are still presented with dirt. > > Thank“s for help. > > > var config = { > headers : { > 'Content-Type': 'application/json;charset=iso-8859-1' > } > } > $http.post('views/protected/result.php', data, config) > .success(function(data, status, headers, config) > { > sucesso(); > }) > .error(function(data, status, headers, config) > { > console.log('error'); > erro(); > }); > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Lucas Lacroix Computer Scientist Advanced Technology Division, MEDITECH <http://ehr.meditech.com/> 781-774-2293 -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
