Issue with CloudFront-Viewer-City Header

0

Encountering encoding discrepancies in the CloudFront-Viewer-City header. Despite percent decoding, the city name "Patiala" appears as "Pati%C4%81la". Seeking insights on rectifying this issue for accurate representation of city names.

Mohit
질문됨 2달 전106회 조회
1개 답변
1

From RFC 8187, we see non US-ASCII values require encoding.

By default, header field values in Hypertext Transfer Protocol (HTTP) messages cannot easily carry characters outside the US-ASCII coded character set. [...] This document specifies an encoding suitable for use in HTTP header fields that is compatible with a simplified profile of the encoding defined in RFC 2231.

Patiāla was UTF-8 character encoded, and then percent-encoded to be Pati%C4%81la

Here is a JavaScript example on how to decode that value:

console.log(decodeURIComponent('Pati%C4%81la'))
profile pictureAWS
답변함 2달 전
profile picture
전문가
검토됨 2달 전
  • Just letting you know that "Patiala" name shouldn't have accented a character. You can confirm the name on Google Maps. In fact none of the places in India would need special characters.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠