Re: $_GET is Mangling Base64 value

From: Date: Thu, 11 Mar 2010 22:08:22 +0000
Subject: Re: $_GET is Mangling Base64 value
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-302721@lists.php.net to get a copy of this message
On Thu, Mar 11, 2010 at 1:57 PM, George Langley <george.langley@shaw.ca> wrote: > xxxxx is a Japanese phrase, that has been encoded into Base64. So is using the + symbol: > > ...OODq+OCou... > > but my $_GET is replacing the + with a space: > > ...OODq OCou... > > thus the base64_decode() is failing (displays diamonds with questions marks on my Mac). You could always pre-parse it with $_GET['foo'] = str_replace(' ', '+', $_GET['foo']); and inject them back in... I have had to do something like that in the past because of the same issue (I either needed to add or remove the + I forget)

« previous php.general (#302721) next »