js| Chinese
About the Chinese problem of flex, can be regarded as a cliché, but we still have a lot of people always make mistakes in this area, including Kenshin, also took some detours, so now on the Chinese parameter on the flex problem in good thank you, if there is a wrong place to write, but also please forgive
In fact, the resolution of the Chinese problem, no matter what is the consistency of coding, for example, for example, two people to communicate, then their language must be consistent, so that both sides can understand each other's words, this is a common sense in the real life, in the programming time, the reason is the same, want to make flex and JSP are " To say the same thing, the first thing to do is to put their code, that is, "language" into the same, which is the crux of the problem. The first thing to do is to put the coding of 2 languages to reflect the format.
We all know that flex is encoded in the form of Utf-8,<?xml version= "1.0" encoding= "utf-8"?> This sentence has been said very clearly
JSP also has about encoding settings <%@ page contenttype= "text/html charset=utf-8"%> so you can also set the encoding form of the JSP
Through the above, the 2 languages of the characters, coding are consistent, that is, utf-8 form, so that the 2 languages can be established to "communicate."
In general, the most important step we have already taken care of. The transfer of Flex Chinese is divided into the following two situations:
- Flex→jsp, on the basis of the above, add request.getparameter ("AAA") to the Jsp. GetBytes ("Iso8859-1"), "Utf-8") This allows the parameters passed in from flex to retain the Chinese character status in the JSP.
- Jsp→flex, also on the basis of the above, as long as the two sides of the encoding form are utf-8 form, you can make the results in Flex is a Chinese character.
The above to make about Flex, JSP between the Chinese-language parameters of the solution, if there is anything wrong place also please correct, too late, Kenshin to sleep, tomorrow in saying
Small Knitting Language: or that sentence, we are not everyone can we know so much about flex, but each of us can do a little bit of work for our interests. As long as your one click, a message can give the author more power. International...... Collective to Kenshin of the nest irrigation.