Re: Special Chars on Form to Image (GD), not displaying properly.
| From: | Curt Zirzow | Date: | Wed, 22 Feb 2006 05:07:19 +0000 |
| Subject: | Re: Special Chars on Form to Image (GD), not displaying properly. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230872@lists.php.net to get a copy of this message | ||
On Wed, Feb 22, 2006 at 12:38:19PM +0800, Louie Miranda wrote:
> Im having a trouble displaying special characters like #, + on GD (Jpeg) -
> Image. When i typed in on the form +88 it only shows 88 and the + sign is
> missing.
>
> My code:
> <?php
> ..
> $line_1_1 = urldecode($_GET["line_1_1"]);
You dont want to urldecode() the $_GET vars. PHP already does this
step.
See what happens with:
var_dump(urldecode($_GET['line_1_1']));
var_dump($_GET['line_1_1']);
> ...
> I made a couple of tests and found this variables.
>
> The data that will be pass: +88and#
> Data from the url (address box): &line_1_1=%2B88and%23
> Image displayed: 88and - only missing + and #
>
> What could i be missing?
Well if you dont use the urldecode() as mentioned above, the only
reasons i can think of (assuming + will display properly now):
- The font doesn't have a definition for #
- The area isn't big enough so # is getting truncated.
Curt.
--
cat .signature: No such file or directory