Decodes the specified string by replacing all _<num> with it's original value \" \' etc It will also decode the \" \' if keep_slashes is set to fale or omitted
776433
function decode(str, keep_slashes) {
                        isEncoded && (str = str.replace(/\uFEFF[0-9]/g, function(str) {
                            return encodingLookup[str];
                        }));
                        keep_slashes || (str = str.replace(/\\([\'\";:])/g, '$1'));
                        return str;
                    }
199760
def decode(string, encoding=None, errors=None):
    
    if encoding is None:
        encoding = getpreferredencoding()
    if errors is None:
        errors = getpreferrederrors()
    return string.decode(encoding, errors)
808198
def _decode_v2(value):
    
    if re.search(r'(?<!\$):', value):
        raise ValueError("Unescaped ':' in the encoded string")

    decode_colons = value.replace('$:', ':')

    if re.search(r'(?<!\$)(\$\$)*\$([^$]|\Z)', decode_colons):
        raise ValueError("Unescaped '$' in encoded string")
    return decode_colons.replace('$$', '$')
208897
private static String decode(final String str) {
        if (str == null) {
            return null;
        }

        for (int i = 0; i < str.length(); ++i) {
            if (str.charAt(i) == '%') {
                return decode(str, i);
            }
        }

        return str;
    }
794698
function decode(string) {

        var stack = [], i = -1, decoded,
            type, top, value,
            getKey = false, key, isObj;

        bitsLeft = 8;
        streamIndex = 0;
        bitStream = string;
        bitValue = bitStream.charCodeAt(streamIndex);

        while(true) {

            // Grab type
            type = read(3);

            switch(type) {

            // Bool
            case 0:
                value = read(1) ? true : false;
                break;

            // EOS / Stream Overrun / Null
            case 7:
                switch(read(1)) {
                    case 1:
                        return decoded;

                    case 7:
                        return undefined;

                    default:
                        value = null;
                }
                break;

            // Integer / Float
            case 1:
            case 2:
                switch(read(3)) {
                    case 0:
                        value = read(1);
                        break;

                    case 1:
                        value = read(4);
                        break;

                    case 2:
                        value = read(8);
                        break;

                    case 3:
                        value = (read(4) << 8)
                                + read(8);

                        break;

                    case 4:
                        value = (read(8) << 8)
                                + read(8);

                        break;

                    case 5:
                        value = (read(4) << 16)
                                + (read(8) << 8)
                                + read(8);

                        break;

                    case 6:
                        value = (read(8) << 16)
                                + (read(8) << 8)
                                + read(8);

                        break;

                    case 7:
                        value = (read(8) << 24)
                                + (read(8) << 16)
                                + (read(8) << 8)
                                + read(8);

                        break;
                }

                if (read(1)) {
                    value = -value;
                }

                if (type === 2) {
                    value /= reversePowTable[read(4)];
                }

                break;

            // String
            case 3:

                var size = read(5);
                switch(size) {
                    case 31:
                        size = (read(8) << 24)
                               + (read(8) << 16)
                               + (read(8) << 8)
                               + read(8);

                        break;

                    case 30:
                        size = (read(8) << 8)
                               + read(8);

                        break;

                    case 29:
                        size = read(8);
                        break;

                }

                // Read a raw string from the stream
                if (bitsLeft !== 8) {
                    streamIndex++;
                    bitValue = 0;
                    bitsLeft = 8;
                }

                value = bitStream.substr(streamIndex, size);
                streamIndex += size;
                bitValue = bitStream.charCodeAt(streamIndex);

                if (getKey) {
                    key = value;
                    getKey = false;
                    continue;
                }

                break;

            // Open Array / Objects
            case 4:
            case 5:
                getKey = type === 5;
                value = getKey ? {} : [];

                if (decoded === undefined) {
                    decoded = value;

                } else {

                    if (isObj) {
                        top[key] = value;

                    } else {
                        top.push(value);
                    }
                }

                top = stack[++i] = value;
                isObj = !(top instanceof Array);
                continue;

            // Close Array / Object
            case 6:
                top = stack[--i];
                getKey = isObj = !(top instanceof Array);
                continue;
            }

            // Assign value to top of stack or return value
            if (isObj) {
                top[key] = value;
                getKey = true;

            } else if (top !== undefined) {
                top.push(value);

            } else {
                return value;
            }

        }

    }
163313
def decode(s):
    
    if isinstance(s, binary_type):
        s = s.decode('latin-1')
    if not isinstance(s, text_type):
        return s

    r = []
    _in = []
    for c in s:
        if c == '&' and not _in:
            _in.append('&')
        elif c == '-' and _in:
            if len(_in) == 1:
                r.append('&')
            else:
                r.append(modified_deutf7(''.join(_in[1:])))
            _in = []
        elif _in:
            _in.append(c)
        else:
            r.append(c)
    if _in:
        r.append(modified_deutf7(''.join(_in[1:])))

    return ''.join(r)
1331515
public static String decodeString(String encoded,int offset,int length,String charset)
    {
        if (charset==null)
            charset=StringUtil.__ISO_8859_1;
        byte[] bytes=null;
        int n=0;
        
        for (int i=0;i<length;i++)
        {
            char c = encoded.charAt(offset+i);
            if (c<0||c>0xff)
                throw new IllegalArgumentException("Not encoded");
            
            if (c=='+')
            {
                if (bytes==null)
                {
                    bytes=new byte[length*2];
                    encoded.getBytes(offset, offset+i, bytes, 0);
                    n=i;
                }
                bytes[n++] = (byte) ' ';
            }
            else if (c=='%' && (i+2)<length)
            {
                byte b;
                char cn = encoded.charAt(offset+i+1);
                if (cn>='a' && cn<='z')
                    b=(byte)(10+cn-'a');
                else if (cn>='A' && cn<='Z')
                    b=(byte)(10+cn-'A');
                else
                    b=(byte)(cn-'0');
                cn = encoded.charAt(offset+i+2);
                if (cn>='a' && cn<='z')
                    b=(byte)(b*16+10+cn-'a');
                else if (cn>='A' && cn<='Z')
                    b=(byte)(b*16+10+cn-'A');
                else
                    b=(byte)(b*16+cn-'0');

                if (bytes==null)
                {
                    bytes=new byte[length*2];
                    encoded.getBytes(offset, offset+i, bytes, 0);
                    n=i;
                }
                i+=2;
                bytes[n++]=b;
            }
            else if (n>0)
                bytes[n++] = (byte) c;
        }

        if (bytes==null)
        {
            if (offset==0 && encoded.length()==length)
                return encoded;
            return encoded.substring(offset,offset+length);
        }
        
        try
        {
            return new String(bytes,0,n,charset);
        }
        catch (UnsupportedEncodingException e)
        {
            return new String(bytes,0,n);
        }
        
    }
716538
def _unescape_str(value):
        

        if isinstance(value, int):
            return "%d" % value
        value = value.replace(r"\\", "\\")
        for i, j in ts3_escape.items():
            value = value.replace(j, i)
        return value
654848
def decode_string(data, encoding='hex'):
    '''
    
    '''
    if six.PY2:
        return data.decode(encoding)
    else:
        return codecs.decode(data.encode('ascii'), encoding)
309217
def normalize_str(string):
    
    if string:
        if not isinstance(string, str):
            string = str(string, 'utf-8', 'replace')

        string = string.encode('utf-8')
        return normalize(
            'NFKD', string.decode('utf-8')).encode('ASCII', 'ignore').decode()
    return ''
1084480
public static String decode(String str)
    {
        String ret = str;

        try
        {
            // De-obfuscate the string
            if(ret != null)
                ret = new String(Base64.decodeBase64(ret.getBytes()));
        }
        catch(NoClassDefFoundError e)
        {
            System.out.println("WARNING: unable to decode: "
                +e.getClass().getName()+": "+e.getMessage());
        }

        return ret;
    }
557895
function decodeStr(s, decoder) {
  try {
    return decoder(s);
  } catch (e) {
    return QueryString.unescape(s, true);
  }
}
1371988
def decode(string)
      padding_size  = string.bytesize % 4
      padded_string = padding_size > 0 ? string + '=' * (4 - padding_size) : string

      Base64.urlsafe_decode64(padded_string)
    end
709267
def encode(string):
		

		result=".".join([ str(ord(s)) for s in string ])
		return  "%s." % (len(string)) + result
154779
def _decode_fname(self):
        """"""
        self.fname = self.fname[:self.fname.find('\0')]
        self.fname = self.fname.replace('\\', '/')
767994
def decode(cls, s):
        
        b = ByteString(s)
        bd = base64.b64decode(b)
        return String(bd)
179398
public static String decode(String encoded) {
        // speedily leave if we're not needed
        if (encoded == null)
            return null;
        if (encoded.indexOf('%') == -1 && encoded.indexOf('+') == -1)
            return encoded;

        //allocate the buffer - use byte[] to avoid calls to new.
        byte holdbuffer[] = new byte[encoded.length()];

        char holdchar;
        int bufcount = 0;

        for (int count = 0; count < encoded.length(); count++) {
            char cur = encoded.charAt(count);
            if (cur == '%') {
                holdbuffer[bufcount++] = (byte) Integer.parseInt(encoded.substring(count + 1, count + 3), 16);
                if (count + 2 >= encoded.length())
                    count = encoded.length();
                else
                    count += 2;
            }
            else if (cur == '+') {
                holdbuffer[bufcount++] = (byte) ' ';
            }
            else {
                holdbuffer[bufcount++] = (byte) cur;
            }
        }
        // REVISIT -- remedy for Deprecated warning.
        //return new String(holdbuffer,0,0,bufcount);
        return new String(holdbuffer, 0, bufcount);
    }