You need to sign in to do that
Don't have an account?

How to urlencode in Apex code?
Hello.
I want to urlencode in Apex code. But I cant't find any way.
String targetString = 'テスト用文字列'; String encodedString = URLENCODE(targetString);
If I can encode like above sample. But, It's occur Error.
Please tell me How to urlencode in Apex code.
try
String encodedString = EncodingUtil.urlEncode(targetString,'UTF-8');
Dan
Try This
targetString = EncodingUtil.URLENCODE(targetString,'UTF-8');
Thank you.all.
I 've got it.