sending data (Cyrillic) via $ .ajax to the server comes from „С‹ РІР ° Р ° РІ. You cannot change the encoding to utf.
2 answers
iconv () to help you
- No, it does not help. give a simple example if you succeed. - ferz
- . $ str = 'С „С‹ РІР ° Р ° РІ'; echo iconv ('utf-8', 'cp1251', $ str); // fayavav - Deonis
|
AJAX
contentType: "application/json; charset=windows-1251", method: 'POST', url: url, data: requestData, headers: {'Content-Type': 'application/x-www-form-urlencoded'} Php
header('Content-Type: text/json; charset=windows-1251'); So did not try?
|