Urlencode или трансформация для запроса

Dexio

Client
Регистрация
09.05.2014
Сообщения
1 254
Благодарностей
220
Баллы
63
Как преобразовывать текст в текст в такой вид? %D0%92%D0%B8%D0%BA%D2%82%D0%BE%D1
 

Nord

Client
Регистрация
22.03.2012
Сообщения
2 377
Благодарностей
1 436
Баллы
113
var encoding = ZennoLab.Macros.TextProcessing.UrlEncode(text)
 

Nord

Client
Регистрация
22.03.2012
Сообщения
2 377
Благодарностей
1 436
Баллы
113
PrepToJavaScriptEval Performs the text preparing for JavaScript evaluation.
RandomText Gets the random text.
RemoveDuplicates Removes duplicates.
Replace Returns a new string in which occurrences of a specified string in the current instance are replaced with another specified string.
Spintax Spintaxes the string.
Split Splits the string.
ToChar Converts the integer value in specified string to a Unicode character.
ToList Converts all items in specified string to the list of the project model.
ToLower Returns a copy of this string converted to lowercase in specified place.
ToTable Converts all items in specified string to the table of the project model.
ToUpper Returns a copy of this string converted to uppercase in specified place.
Translate Translate text through the specified DLL library.
Translit Converts the string to translit.
Trim Overloaded. Removes all leading and trailing, leading or trailing specified characters from the current String object.
UrlDecode Decodes the string from UrlEncode.
UrlEncode Encodes the string to UrlEncode.
 

Dexio

Client
Регистрация
09.05.2014
Сообщения
1 254
Благодарностей
220
Баллы
63
Вот что дает
Тип Время Сообщение
19:40:38 Компиляция кода Ошибка в действии "CS0117" "'ZennoLab.Macros.TextProcessing' does not contain a definition for 'UrlEncode'". [Строка: 2; Cтолбец: 36]
 

Dexio

Client
Регистрация
09.05.2014
Сообщения
1 254
Благодарностей
220
Баллы
63
Блин, раньше вроде кубиком было. Кубиком нельзя больше? http://zennolab.com/wiki/ru:actions:text
Url encode при работе с переменной? Обработка текста.
Сниппетом не получается
 

LaGir

Client
Регистрация
01.10.2015
Сообщения
223
Благодарностей
894
Баллы
93
Блин, раньше вроде кубиком было. Кубиком нельзя больше? http://zennolab.com/wiki/ru:actions:text
Url encode при работе с переменной? Обработка текста.
Сниппетом не получается
Возможно, у Вас версия ниже 5.9.9.0, в которой появился такой функционал в кубике и в коде через TextProcessing.
В этом случае можно преобразовать так:
C#:
return Uri.EscapeDataString("текст для кодирования");
 

Mikhail B.

Moderator
Регистрация
23.12.2014
Сообщения
14 334
Благодарностей
5 432
Баллы
113

Dexio

Client
Регистрация
09.05.2014
Сообщения
1 254
Благодарностей
220
Баллы
63

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)