• Chun
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

system.debug(System.Encodingutil.urlEncode('你好', 'gb2312'));

output  "%C4%E3%BA%C3"

 

system.debug(System.Encodingutil.urlEncode('你好', 'utf-8'));

output  "%E4%BD%A0%E5%A5%BD"

 

 

Page:

<apex:inputTextarea value="{!fchrMsg}" id="fchrMsg"/>

class:

    public string fchrMsg{
        get{
            if(fchrMsg == null){
                string fchrTmpMsg = ApexPages.currentPage().getParameters().get('msg');
                if(fchrTmpMsg != null)
                    fchrMsg = System.Encodingutil.urlDecode(fchrTmpMsg, 'gb2312');
                else
                    fchrMsg = '';
            }
            return fchrMsg;
        }
        set{
            fchrMsg = value;
        }
    }

I want to receive parameter by the url "mypage?msg=%C4%E3%BA%C3"

 

but i get a null value

 

Who can help me!

 

 

Message Edited by china.leaf on 05-12-2009 12:53 AM
Message Edited by china.leaf on 05-12-2009 01:27 AM