Monday, 24 July 2017

php - Enforce UTF-8 charset for web server

Answer


I am trying to set UTF-8 charset for my web server. Below is the sample header I am sending.



Request Method: GET
Status Code: 401 / Unauthorized



Response header is:



Content-type: text/html; charset=UTF-8
WWW-Authenticate: Basic realm=10.102.147.190


But for different browsers I am getting different values:
IE is encoding Latin Character Small E:test as Pzp0ZXN0, chrome as 4bSHOnRlc3Q= and firefox as Bzp0ZXN0




as a result, the username is different when entered from different browsers.
I googled this quite a but, but seems setting the "charset=utf-8" is the only solution, which is not working in my case. let me know how to solve this issue.



Any help is much appreciated. Thanks in advance.

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...