Transfer of Chinese parameters between flex and JSP

Source: Internet
Author: User
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:

    1. 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.
    2. 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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.