You need to sign in to do that
Don't have an account?
please help me? how can i receive a parameter (encoding gb2312)
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!