I have been talking about the Chinese issue of Flex, but many people still make mistakes in this regard, including kenshin, which has also taken some detours, so now let's take a look at the question of Flex's Chinese parameters. Thank you. If you have written something wrong, please forgive me.
In fact, the solution to the Chinese problem is nothing more than encoding consistency. For example, if two people communicate, their language must be consistent, in this way, both parties can understand what the other party has said. This is a common sense in real life. in programming, the truth is the same. To make Flex and JSP both "say the same thing ", first, we need to make their encoding, that is, "language", consistent. This is the root cause. The first thing we need to do is to display the encoding settings of the two languages.
We all know that the Flex encoding method is in the UTF-8 format. This sentence is clear.
You can also set the encoding format in JSP.
After the above writing, the characters and encoding of these two languages are consistent, that is, they are in the UTF-8 format, so that the two languages can establish "communication ".
In general, we have done the most important step. There are two cases of Flex Chinese transfer:
Flex and JSP, based on the above, add request in JSP. getParameter ("AAA "). getBytes ("ISO8859-1"), "UTF-8") so that the parameters passed in from Flex can maintain the Chinese character state in JSP.
Flex and JSP are also based on the above. As long as both sides are encoded in UTF-8 format, the results in Flex can be Chinese characters.
- JSP bean code optimization
- Detailed introduction to JSP environment configuration Scheme
- Use stored procedures in JSP JSTL
- Which of ASP. NET, JSP, and PHP is better?
- JSP-related software