Troubleshooting of Chinese garbled characters in flex when amfnet is used

Source: Internet
Author: User

The amfnet encapsulation simplifies flex and. NET through the AMF communication process, but I found that the support for Chinese and other double byte languages is not good (Bug), I corrected and added several small features, the modified dll can be downloaded through the following link (I changed the name to netamf first,CodeAll are based on amfnet ):

Http://files.cnblogs.com/XiaoG/NetAMF.rar

 

The main changes are as follows:

1. Added support for Chinese and other double-byte texts to solve problems such as garbled codes and parsing errors in flex.

2. added the specified typeProgramFunction of the Set (the type error cannot be found in the original amfnet). For more information, see the red text section in the following code.

3. Added support for the xdocument type in LINQ

4. You have upgraded from. NET Framework 2.0 to 3.5.

 

Example:

 

     
VaR method: String ="Somemethod";
VaR NC: netconnection = New Netconnection ();
NC. Connect ( " Http: // 127.0.0.1: 53246/X. php " );
NC. objectencoding = Objectencoding. amf3;

VaR RP: Responder = New Responder (onresult, Function (ERR: Object ): Void {
Throw New Error ( " [Amfserver] usage method " + Method + " Loss of ownership, " + Err. Description );
});
NC. Call ( " Yournamespace. yourclass. " + Method + " ,Yourassemblyfullname " , RP,P1, P2, p3... );

 

 

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.