- where [Data Pill] is a sting containing spaces, commas, etc.
Everything works except the .encode function, and I can't find documentation on how it's used. Can you help me understand how the string [Data Pill] can be encoded for use in a URL?
note: using .encode_www_form throws an error as well, and recommends using the .encode function.
M
Mary Gabriola
said
over 4 years ago
Hello,
To clarify, if you would like to use the .encode_www_form,the string that you will be encoding should be in the format of hashes.
Please see screenshot below for example:
Also, we would need to know what encoding your [datapill] string isactually in, for us to know what the right .encode formula you should be using.
If you would want further help and for us to troubleshoot your issue specifically, please send us an email to support@workato.com with the details of your issue.
T
Taylor Davis
said
over 4 years ago
Hi Mary,
Thanks for your help! To clarify, I do not want to use .encode_www_form – I want to encode in UTF-8.
I am confused by "we would need to know what encoding your [datapill] string isactually in." The [datapill] string is a Message logged to the output via Utilities for Workato. Is the output of a logged message encoded?
Basically, I'm asking: how can someone encode a string for use as a URL parameter?
The string could be "Wash the car", for example; I need to know how to formulaically encode a [datapill] string containing the value "Wash the car" in UTF-8.
M
Mary Gabriola
said
over 4 years ago
Hi Taylor,
The output of a logged message is not encoded.
Also, it would be best to send us an email to support@workato.com with the details of your issue if you are encountering any errors. We can further look into this if you are able to provide us with screenshots of the error you are encountering when you are converting the datapill.
If you would want to encode a string to UTF-8 you can do that by using the .encode("UTF-8") function, this should not be a problem.
Saul Macht
Encoding Formula
What are the available encodings I can use with the “.encode” function?
Hi Saul,
Thanks for reaching out! The following is a list of the available encodings:
"ASCII-8BIT",
"UTF-8",
"US-ASCII",
"UTF-16BE",
"UTF-16LE",
"UTF-32BE",
"UTF-32LE",
"UTF-16",
"UTF-32",
"UTF8-MAC",
"EUC-JP",
"Windows-31J",
"Big5",
"Big5-HKSCS",
"Big5-UAO",
"CP949",
"Emacs-Mule",
"EUC-KR",
"EUC-TW",
"GB2312",
"GB18030",
"GBK",
"ISO-8859-1",
"ISO-8859-2",
"ISO-8859-3",
"ISO-8859-4",
"ISO-8859-5",
"ISO-8859-6",
"ISO-8859-7",
"ISO-8859-8",
"ISO-8859-9",
"ISO-8859-10",
"ISO-8859-11",
"ISO-8859-13",
"ISO-8859-14",
"ISO-8859-15",
"ISO-8859-16",
"KOI8-R",
"KOI8-U",
"Shift_JIS",
"Windows-1250",
"Windows-1251",
"Windows-1252",
"BINARY",
"IBM437",
"CP437",
"IBM737",
"CP737",
"IBM775",
"CP775",
"CP850",
"IBM850",
"IBM852",
"CP852",
"IBM855",
"CP855",
"IBM857",
"CP857",
"IBM860",
"CP860",
"IBM861",
"CP861",
"IBM862",
"CP862",
"IBM863",
"CP863",
"IBM864",
"CP864",
"IBM865",
"CP865",
"IBM866",
"CP866",
"IBM869",
"CP869",
"Windows-1258",
"CP1258",
"GB1988",
"macCentEuro",
"macCroatian",
"macCyrillic",
"macGreek",
"macIceland",
"macRoman",
"macRomania",
"macThai",
"macTurkish",
"macUkraine",
"CP950",
"Big5-HKSCS:2008",
"CP951",
"IBM037",
"ebcdic-cp-us",
"stateless-ISO-2022-JP",
"eucJP",
"eucJP-ms",
"euc-jp-ms",
"CP51932",
"EUC-JIS-2004",
"EUC-JISX0213",
"eucKR",
"eucTW",
"EUC-CN",
"eucCN",
"GB12345",
"CP936",
"ISO-2022-JP",
"ISO2022-JP",
"ISO-2022-JP-2",
"ISO2022-JP2",
"CP50220",
"CP50221",
"ISO8859-1",
"ISO8859-2",
"ISO8859-3",
"ISO8859-4",
"ISO8859-5",
"ISO8859-6",
"Windows-1256",
"CP1256",
"ISO8859-7",
"Windows-1253",
"CP1253",
"ISO8859-8",
"Windows-1255",
"CP1255",
"ISO8859-9",
"Windows-1254",
"CP1254",
"ISO8859-10",
"ISO8859-11",
"TIS-620",
"Windows-874",
"CP874",
"ISO8859-13",
"Windows-1257",
"CP1257",
"ISO8859-14",
"ISO8859-15",
"ISO8859-16",
"CP878",
"MacJapanese",
"MacJapan",
"ASCII",
"ANSI_X3.4-1968",
"646",
"UTF-7",
"CP65000",
"CP65001",
"UTF-8-MAC",
"UTF-8-HFS",
"UCS-2BE",
"UCS-4BE",
"UCS-4LE",
"CP932",
"csWindows31J",
"SJIS",
"PCK",
"CP1250",
"CP1251",
"CP1252",
"UTF8-DoCoMo",
"SJIS-DoCoMo",
"UTF8-KDDI",
"SJIS-KDDI",
"ISO-2022-JP-KDDI",
"stateless-ISO-2022-JP-KDDI",
"UTF8-SoftBank",
"SJIS-SoftBank"
Patricia Guevarra
Hi Saul,
Thanks for reaching out! The following is a list of the available encodings:
"ASCII-8BIT",
"UTF-8",
"US-ASCII",
"UTF-16BE",
"UTF-16LE",
"UTF-32BE",
"UTF-32LE",
"UTF-16",
"UTF-32",
"UTF8-MAC",
"EUC-JP",
"Windows-31J",
"Big5",
"Big5-HKSCS",
"Big5-UAO",
"CP949",
"Emacs-Mule",
"EUC-KR",
"EUC-TW",
"GB2312",
"GB18030",
"GBK",
"ISO-8859-1",
"ISO-8859-2",
"ISO-8859-3",
"ISO-8859-4",
"ISO-8859-5",
"ISO-8859-6",
"ISO-8859-7",
"ISO-8859-8",
"ISO-8859-9",
"ISO-8859-10",
"ISO-8859-11",
"ISO-8859-13",
"ISO-8859-14",
"ISO-8859-15",
"ISO-8859-16",
"KOI8-R",
"KOI8-U",
"Shift_JIS",
"Windows-1250",
"Windows-1251",
"Windows-1252",
"BINARY",
"IBM437",
"CP437",
"IBM737",
"CP737",
"IBM775",
"CP775",
"CP850",
"IBM850",
"IBM852",
"CP852",
"IBM855",
"CP855",
"IBM857",
"CP857",
"IBM860",
"CP860",
"IBM861",
"CP861",
"IBM862",
"CP862",
"IBM863",
"CP863",
"IBM864",
"CP864",
"IBM865",
"CP865",
"IBM866",
"CP866",
"IBM869",
"CP869",
"Windows-1258",
"CP1258",
"GB1988",
"macCentEuro",
"macCroatian",
"macCyrillic",
"macGreek",
"macIceland",
"macRoman",
"macRomania",
"macThai",
"macTurkish",
"macUkraine",
"CP950",
"Big5-HKSCS:2008",
"CP951",
"IBM037",
"ebcdic-cp-us",
"stateless-ISO-2022-JP",
"eucJP",
"eucJP-ms",
"euc-jp-ms",
"CP51932",
"EUC-JIS-2004",
"EUC-JISX0213",
"eucKR",
"eucTW",
"EUC-CN",
"eucCN",
"GB12345",
"CP936",
"ISO-2022-JP",
"ISO2022-JP",
"ISO-2022-JP-2",
"ISO2022-JP2",
"CP50220",
"CP50221",
"ISO8859-1",
"ISO8859-2",
"ISO8859-3",
"ISO8859-4",
"ISO8859-5",
"ISO8859-6",
"Windows-1256",
"CP1256",
"ISO8859-7",
"Windows-1253",
"CP1253",
"ISO8859-8",
"Windows-1255",
"CP1255",
"ISO8859-9",
"Windows-1254",
"CP1254",
"ISO8859-10",
"ISO8859-11",
"TIS-620",
"Windows-874",
"CP874",
"ISO8859-13",
"Windows-1257",
"CP1257",
"ISO8859-14",
"ISO8859-15",
"ISO8859-16",
"CP878",
"MacJapanese",
"MacJapan",
"ASCII",
"ANSI_X3.4-1968",
"646",
"UTF-7",
"CP65000",
"CP65001",
"UTF-8-MAC",
"UTF-8-HFS",
"UCS-2BE",
"UCS-4BE",
"UCS-4LE",
"CP932",
"csWindows31J",
"SJIS",
"PCK",
"CP1250",
"CP1251",
"CP1252",
"UTF8-DoCoMo",
"SJIS-DoCoMo",
"UTF8-KDDI",
"SJIS-KDDI",
"ISO-2022-JP-KDDI",
"stateless-ISO-2022-JP-KDDI",
"UTF8-SoftBank",
"SJIS-SoftBank"
R7-Dev (old)
Which encoding type to use for url encoding?
Patricia Guevarra
Hi,
Thanks for reaching out! You can use the following formula: .encode_www_form
Taylor Davis
Hello,
I am using the .encode function as part of a formulaic URL, and I am encountering errors. The structure of my formula looks like:
- where [Data Pill] is a sting containing spaces, commas, etc.
Everything works except the .encode function, and I can't find documentation on how it's used. Can you help me understand how the string [Data Pill] can be encoded for use in a URL?
note: using .encode_www_form throws an error as well, and recommends using the .encode function.
Mary Gabriola
Hello,
To clarify, if you would like to use the .encode_www_form, the string that you will be encoding should be in the format of hashes.
Please see screenshot below for example:
Also, we would need to know what encoding your [datapill] string is actually in, for us to know what the right .encode formula you should be using.If you would want further help and for us to troubleshoot your issue specifically, please send us an email to support@workato.com with the details of your issue.
Taylor Davis
Hi Mary,
Thanks for your help! To clarify, I do not want to use .encode_www_form – I want to encode in UTF-8.
I am confused by "we would need to know what encoding your [datapill] string is actually in." The [datapill] string is a Message logged to the output via Utilities for Workato. Is the output of a logged message encoded?
Basically, I'm asking: how can someone encode a string for use as a URL parameter?
The string could be "Wash the car", for example; I need to know how to formulaically encode a [datapill] string containing the value "Wash the car" in UTF-8.
Mary Gabriola
Hi Taylor,
The output of a logged message is not encoded.
Also, it would be best to send us an email to support@workato.com with the details of your issue if you are encountering any errors. We can further look into this if you are able to provide us with screenshots of the error you are encountering when you are converting the datapill.
If you would want to encode a string to UTF-8 you can do that by using the .encode("UTF-8") function, this should not be a problem.