1

I understand why we should url-encode reserved characters is some cases. For example, if we write this: http://example.com/somepage?searchText=abc&maxResults=10

The URL above transmits two pieces of information to the server:

searchText=abc

maxResults=10

It is because we have reserved characters in the url:

enter image description here

But if we want to convey the searchText ​​​​​​​content with the value of:

searchText=abc&maxResults=10

We need to use url-encoding

http://example.com/somepage?searchText=abc%26maxResults%3D10 

enter image description here

But I don't understand why any character outside the ASCII charset should be url-encoded? (For example - cyrillic symbols such a "у П х з", or chinese etc.)

1 Answer 1

1

It seems I find the answer: https://www.rfc-editor.org/rfc/rfc2396#section-2.1

For original character sequences that contain non-ASCII characters, however, the situation is more difficult. Internet protocols that transmit octet sequences intended to represent character sequences are expected to provide some way of identifying the charset used, if there might be more than one [RFC2277]. However, there is currently no provision within the generic URI syntax to accomplish this identification. An individual URI scheme may require a single charset, define a default charset, or provide a way to indicate the charset used.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.