1

I have faced an error when using the character encodes in URL parameters.

We are using TUPAS verification in our Salesforce customer community. When the user authorizes with the bank codes he got redirected back to the community and bank sends credentials via query parameters.

For instance, B02K_CUSTNAME for the customer name. Some of the clients have Ä and Ö letters in their names. These got encoded to %C4 and %D6 which leads to a VisualForce page error: Page is unfinished.

e.g. https://site.salesforce.com/community/?B02K_CUSTNAME=M%C4ki

The error only appears if encoded char is in front or the middle of the value, so B02K_CUSTNAME=Mki%C4 would work.

Have anybody encountered this error before? Any thoughts on how to fix it?

Thank you!

Update: Seems that it is impossible to resolve this issue in SF. As a temporary solution, I wrote a middleware script in PHP to encode URL using UTF-8 and redirect.

4
  • and what do you do with B02K_CUSTNAME?
    – Novarg
    Commented Nov 14, 2017 at 12:40
  • I do nothing with it, and bank returns it by default. Also, the error appears before the controller gets loaded. It seems that the problem is with the Salesforce settings because it has UTF-8 encoding instead of ISO 8859-1 (Latin 1). I tried manually encode the URI and it works correctly, but I'm not sure how to do it beforehand.
    – Frelseren
    Commented Nov 14, 2017 at 12:46
  • just tried it on a random VF page in my org and it does show me "under construction" page. Tried to debug it, but no debug logs appear! Maybe it's something that's worth logging a case?
    – Novarg
    Commented Nov 14, 2017 at 12:52
  • Yes, I will log a case but not thinking that it would help. I've found that the other developers are also complaining about TUPAS because they aren't using UTF-8... Interesting link "The character set for your organization depends on the Salesforce instance your organization uses. If your organization logs into ssl.salesforce.com, then your encoding is ISO-8859-1"
    – Frelseren
    Commented Nov 14, 2017 at 13:37

0

You must log in to answer this question.

Browse other questions tagged .