Answer the question
In order to leave comments, you need to log in
How to decode a string in Google Script?
There is a line
%u0420%u0430%u0431%u043E%u0447%u0435%u0435%20%u0432%u0440%u0435%u043C%u044F
Рабочее время
Answer the question
In order to leave comments, you need to log in
/**
* Декодирует строку вида %uXXXX%uXXXX и/или %XX в текст
* Боев Григорий (с) 2020 (telegram @ProgrammerForever)
*
* @param {string} encoded Кодированный текст
* @return Декодированный текст
* @customfunction
*/
function uEncode(encoded) {
return encoded.split('%')
.filter(el=>el!='')
.map(el=>el[0]==='u'?el.substring(1):el)
.map(el=>parseInt(el,16))
.map(code=>String.fromCodePoint(code))
.join('');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question