decode

How to simply encode and decode a string variable with javascript.

I need to simply encode a string variable (my api key) so that is not easily readable by human eyes, I need it to easily decode back to exactly the same initial string. What is the standard practical and fast (less computing on the user side) way to do this? Many thanks in advance! ...

What is the fastest / best Base64 en/decoder for Java ?

Just found the MIG Base 64 utility but its over 6 years old since its last release. It would appear to be quicker than the Apache commons equivalent but I have yet to confirm by writing up an actual test. Has anyone verified its correctness which is always a worry. If someone takes a look at the methods, please note i a referring to the ...

html source encode

when I view source on my php page I get " for a quote. But instead, I would like " to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do such a thing. ...

Prevent Coldfusion from encoding html

I am trying to return html from <cfsavecontent variables="html"> <p>Some html</p> </cfsavecontent> <cfreturn html> But when it comes back from the function the html is encoded I found this thread http://www.coldfusionjedi.com/forums/messages.cfm?threadid=BB31B124-19B9-E658-9D3F5726B8607FD8 which has some solutions but im hoping for...

decoding algorithm wanted

I receive encoded PDF files regularly. The encoding works like this: the PDFs can be displayed correctly in Acrobat Reader select all and copy the test via Acrobat Reader and paste in a text editor will show that the content are encoded so, examples are: 13579 -> 3579; hello -> jgnnq it's basically an offset (maybe swap) of ASCII...

How do I pass session variables from one domain to another in PHP

Hi everyone, I have encountered a situation where I need to pass $_SESSION variables from one domain to an iFrame page from another domain. I have spent the last 16 days trying various methods to no avail. I think that the only logical way would be to encode the variables in the url that calls the iFrame and decode them in th iFrame pag...

What kind of string is this? What can I do in php to read it?

This is a string (see below, after the dashed line) in a database.inf file for a free program I downloaded that lists some websites. The file is plain text as you can see , but there is a string after it that looks base64 encoded (due to the end chars of ==). But b64_decoding it gives giberish. I wanted to decode it so I could add to t...

Go - Get length to decoding Ascii85

ascii85 has a function to get the maximum length of an encoding MaxEncodedLen(). I think that it should have too a function to get the length at decoding like it has in Base64. http://golang.org/pkg/encoding/ascii85/ ...

Mysql: cannot call decode in stored procedure

hello. when create any stored procedure the function decode dont work delimiter $$ create procedure guardausuario( varKusuario varchar(8), varNombre text, varPwd BLOB) begin declare varValor varchar(128); select encode(varPwd,varKusuario) into varValor; insert into usuarios (k_usuario, nombre, pwd) values (varKusuario,varNombre,v...

How to decode numeric HTML entities in PHP

Hello, I'm trying to decode encoded long dash from numeric entity to string, but it seems that I can't find a function which can do this properly. The best that I found is mb_decode_numericentity(), however, for some reason it fails to decode long dash and some other special characters. $str = '&#8211;'; $str = mb_decode_numericentit...

Python file input string: how to handle escaped unicode characters?

In a text file (test.txt), my string looks like this: Gro\u00DFbritannien Reading it, python escapes the backslash: >>> file = open('test.txt', 'r') >>> input = file.readline() >>> input 'Gro\\u00DFbritannien' How can I have this interpreted as unicode? decode() and unicode() won't do the job. The following code writes Gro\u00DFbr...

Not sure how to use Decode, NVL, and/or isNull (or something else?) in this situation

I have a table of orders for particular products, and a table of products that are on sale. (It's not ideal database structure, but that's out of my control.) What I want to do is outer join the order table to the sale table via product number, but I don't want to include any particular data from the sale table, I just want a Y if the jo...

How to decode such strange string to UTF-8? (PHP)

So I have %u041E%u043B%u0435%u0433%20%u042F%u043A how to save it into real UTF-8 or (better for me to HTML entities)? ...

How can I decode UTF-16 data in Perl when I don't know the byte order?

If I open a file ( and specify an encoding directly ) : open(my $file,"<:encoding(UTF-16)","some.file") || die "error $!\n"; while(<$file>) { print "$_\n"; } close($file); I can read the file contents nicely. However, if I do: use Encode; open(my $file,"some.file") || die "error $!\n"; while(<$file>) { print decode("UTF-16",...

Why this base64 function stop working when increasing max length?

I am using this class to encode/decode text to base64. It works fine with MAX_LEN up to 512 but if I increase it to 1024 the decode function returns and empty var. This is the function: char* Base64::decode(char *src) { unsigned six, dix; unsigned int d_len = MAX_LEN; memset(dst,'\0', MAX_LEN); unsigned s_len = strle...

Base32 decode in actionscript

Hi! How do I decode a Base32 encoded string in Actionscript? /Martin ...

Javascript replace query string + with a space

I'm grabbing the query string parameters and trying to do this: var hello = unescape(helloQueryString); and it returns: this+is+the+string instead of: this is the string Works great if %20's were in there, but it's +'s. Any way to decode these properly so they + signs move to be spaces? Thanks. ...

Decode HTML entities in android

Hi there. I need to decode HTML entities, e.g. from &#246; to ö, and &amp; to &. URLEncoder.decode(str) does not do the job (convert from % notations). TextUtils has a HTMLencode, but not a HTMLdecode. Are there any function for decoding HTML entities? Regards, Johan ...

How do I decode this! It's not base64

Here's what I know... this "GxvS117MfVw=" when decoded turns to "56699" now what does this "+sB6hF46GyU=" turn into "?????" " not included I tried base64 decoder and it doesn't seem to be right. It is supposed to be a number. I am not sure about the length, I don't think it should exceed 5 numbers. I would really appreciate it if you...

storing tamil values in database.

I have stored tamil content something as &agrave.......... But for some content it is stored as #2220....... So while retrieving there arise a problem with it when I try to decode it as original tamil content. How to convert the values from #2220........to &grave....... ...