Usage of encodeuricomponent

Practice leads to true knowledge. When a pit is encountered in the project, it is summarized after filling: coding does not necessarily need decoding

RSA encryption field (after Base64 bit), through URL? After the transmission of file = value, there are always special characters such as + and so on. Then, when it comes to the back end, Base64 cannot be solved, and many spaces are found.

Try to use the encodeuri to find that there are still spaces, and finally use the encodeuricomponent to solve the problem

In conclusion, I found that the following articles are more thorough.

https://www.cnblogs.com/season-huang/p/3439277.html

1、 Foreword

There are too many articles about the difference between these three methods, but most of them are very windy. This paper attempts to talk about these three methods from a practical point of view.

2、 Escape is not the same class as them

Simply put, escape encodes strings (and the other two are URLs) to make them readable on all computers. The effect after encoding is in the form of% xx or% uxxxx. Among them, ASCII letters, numbers and @ * / +, these characters will not be encoded, and the rest will be. Most importantly, when you need to encode the URL, please forget this method. This method is used for strings and is not applicable to URLs. In fact, I haven't used this method in practical work, so I won't talk more.

3、 The most commonly used encodeuri and encodeuricomponent

4、 Most importantly, what occasion and method should I use

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>