Skip to main content
Question

Prevent parameters containing accents in direct url to be encoded into hexadecimal

  • July 5, 2019
  • 1 reply
  • 22 views

bgeorges
Contributor
Forum|alt.badge.img+5

I have a workspace on FME Server that sometimes will receive strings with accent as a parameter.

 

I am calling the workspace with the direct url from a javascript application. I serialize the parameters with browser's encodeURIComponent function to be valid in the direct url.

 

So a string parameter like NomProjet = é become NomProjet=%C3%A9

I found out that parameters, when they are containing accents, are automatically encoded into hexadeciamal by FME Server. So the parameter é become E9 in the workspace. I have to use a TextDecoder to decode them to Latin-1. However, when the parameter does not contain accents, it's not encoded to hex and the TextDecoder produce an error.

 

I would like to prevent FME Server to encode those parameters into hexadecimal. Utf-8 would be perfect. Is there a way to do that?

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

richardatsafe
Safer
Forum|alt.badge.img+10
  • Safer
  • 217 replies
  • July 11, 2019

Hi @bgeorges,

It sounds like your stuck using encodeURIComponent , which sometimes converts to hex depending on the parameter value. There is probably not a way to encode the parameter values before the value enters the workspace with FME Server. It sounds like the "URL (Percent Encoding)" in the TextDecoder should have worked in the workspace, so any reproduction you can supply would very helpful in making sure we are understanding the issue.

Richard