• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Formula Mode Questions
A

Amber Veatch

started a topic about 3 years ago

using gsub to decode utf-8 encoded string

We have the need to decode a string from a HTTP webhook using UTF-8 encoding.


input string: "test product%27s name"


output after decoding should be: "test product's name"


we've tried [IPN.PNAME].gsub(/%\w+/,{'%27' => '''}) but it throws a formula error.


S

Sachin Raju

said about 3 years ago


The below formula will give you the expected output:

[IPN.PNAME].gsub(/:[^%]|%[0-9A-Fa-f]{2}/,{'%27' => "'"})

Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count