Re: [PHP] Special Characters in a String for Output

2009-08-27 Thread Bastien Koert
On Thu, Aug 27, 2009 at 9:56 AM, David Stoltz wrote:
> I have:
>
> $goalString = "Goals Entered By ".$mymanager."On
> ".$when.":".$mygoal."";
>
> Which outputs in this  tag:
>
> 
>
> But if there are double or single quotes in any of the $goalString, it
> messes up the output.
>
> I know this is a simple fix, but I'm not sure how to fix it since I'm
> new to PHP...
>
> I've tried addslashes, etc - but can't get it to work right...
>
> Is there an easy way to escape ALL special characters that would cause
> this output to fail?
>
> Thanks!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


use htmlentities


-- 

Bastien

Cat, the other other white meat

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Special Characters in a String for Output

2009-08-27 Thread David Stoltz
I have:

$goalString = "Goals Entered By ".$mymanager."On
".$when.":".$mygoal."";

Which outputs in this  tag:



But if there are double or single quotes in any of the $goalString, it
messes up the output.

I know this is a simple fix, but I'm not sure how to fix it since I'm
new to PHP...

I've tried addslashes, etc - but can't get it to work right...

Is there an easy way to escape ALL special characters that would cause
this output to fail?

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Special characters

2005-05-16 Thread Brian V Bonini
On Mon, 2005-05-16 at 12:23, Carlos Palomino wrote:
> Hi everyone,
> I have just begun writing PHP web-pages and I have come across an interesting 
> issue. 
> Whenever I use special characters within my code such as: a "©", the 
> character 
> displays as a "?".

Because that's not valid HTML... See:
http://www.w3.org/TR/html401/sgml/entities.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Special characters

2005-05-16 Thread Carlos Palomino
Hi everyone,
I have just begun writing PHP web-pages and I have come across an interesting 
issue. 
Whenever I use special characters within my code such as: a "©", the character 
displays as a "?".  All other text and characters display properly, so I am not 
certain why some special marks do not show up or are shown as completely 
different 
characters altogether.  Does anyone have any suggestions as to why this is the 
case 
and how I can fix this issue?

Thanks. 


[PHP] Special characters

2003-02-19 Thread Kim Kohen
G'day all,

I have a directory with an "Ÿ" (mac Option-F) in the name which PHP
processes as "Ä".  This change renders the files in the directory unopenable
(the path is bad).

Is there some sort of encoding/unencoding which will handle this character
correctly? I've tried every form of encoding I can find in the docs but
nothing seems to work. Can anyone suggest what to look for in the docs or a
possible solution?

cheers

Kim


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] special characters

2002-08-10 Thread Justin French

Have a look at htmlspecialchars() as well.

If these don't meet your needs, you might have to start building your own
function to extend what htmlspecialchars() and htmlentities() do.

Justin French


on 10/08/02 4:58 AM, Jeb A. Scarbrough (home) ([EMAIL PROTECTED])
wrote:

> Is there a way to have PHP to either:
> 
> a)  strip out any non-standard ascii characters (like the TM or copyright
> symbol)
> 
> b) have PHP encode all these symbols.
> 
> I know about htmlentities, but it not catch everything.
> 
> Thanks!
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] special characters

2002-08-09 Thread Analysis & Solutions

On Fri, Aug 09, 2002 at 02:58:26PM -0400, Jeb A. Scarbrough (home) wrote:
> 
> a)  strip out any non-standard ascii characters (like the TM or 
> copyright symbol)

preg_replace() or ereg_replace().


> b) have PHP encode all these symbols.
> 
> I know about htmlentities, but it not catch everything.

htmlentities() is the only automatic game in town.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] special characters

2002-08-09 Thread Jeb A. Scarbrough \(home\)

Is there a way to have PHP to either:

a)  strip out any non-standard ascii characters (like the TM or copyright symbol)

b) have PHP encode all these symbols.

I know about htmlentities, but it not catch everything.

Thanks!



Re: RE: [PHP] special characters with perl,mysql,php

2001-02-24 Thread Christian Reiniger

On Saturday 24 February 2001 07:49, Mitchell Hagerty wrote:
> The special character I'm concerned with at the moment is the back tick
> ` which mysql doesn't like on an insert. I was looking for a way not to
> parse the entire file evertime I inserted or extracted them from the
> database. Its simple enough todo in perl and php just seems like it
> would burn alot of cpu time.
>
> I was actually hoping mysql would have a way to encode it on the way in
> and decode on the way out. That way php or perl would be irrelevant.
> Guess not :\

Well, as someone else already said, addslashes () is the tool of choice 
for the way in, and for he way out you don't need to do anything.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

"The number of Unix installations has grown to 10, with more expected."
 -- The Unix Programmer's Manual, 2nd Edition, June 1972

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: RE: [PHP] special characters with perl,mysql,php

2001-02-23 Thread Mitchell Hagerty

The special character I'm concerned with at the moment is the back tick ` which mysql 
doesn't like on an insert. I 
was looking for a way not to parse the entire file evertime I inserted or extracted 
them from the database. Its 
simple enough todo in perl and php just seems like it would burn alot of cpu time.

I was actually hoping mysql would have a way to encode it on the way in and decode on 
the way out. That way 
php or perl would be irrelevant. Guess not :\

tks for your help
mitch

> i use a regexp to slash-out single quotes for
> inclusion into an SQL query:
> 
> // quote a value to make it appropriate for inclusion in an SQL string
> function db_quote($value) {
>  return ereg_replace("'","\\'",$value);
> }
> 
> 
> 
> > -Original Message-
> > From: Mitchell Hagerty [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 23, 2001 18:54
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] special characters with perl,mysql,php
> > 
> > 
> > Hey All,
> > 
> > What would be a good method for inserting data into a blob field
> > that contained special characters using perl then retrieving that
> > data with php?
> > 
> > URI::Escape has worked well with perl but now that php has
> > gotten into the picture I need a new method.
> > 
> > any suggestions?
> > 
> > tks
> > mitch
> > 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: php-list-
> [EMAIL PROTECTED]> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: php-list-
> [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] special characters with perl,mysql,php

2001-02-23 Thread ..s.c.o.t.t..

i use a regexp to slash-out single quotes for
inclusion into an SQL query:

// quote a value to make it appropriate for inclusion in an SQL string
function db_quote($value) {
  return ereg_replace("'","\\'",$value);
}



> -Original Message-
> From: Mitchell Hagerty [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 18:54
> To: [EMAIL PROTECTED]
> Subject: [PHP] special characters with perl,mysql,php
> 
> 
> Hey All,
> 
> What would be a good method for inserting data into a blob field
> that contained special characters using perl then retrieving that
> data with php?
> 
> URI::Escape has worked well with perl but now that php has
> gotten into the picture I need a new method.
> 
> any suggestions?
> 
> tks
> mitch
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] special characters with perl,mysql,php

2001-02-23 Thread Kyndig


If your refering to:  '  or "  just use:

addslashes($value);   to escape special characters.


On Fri, 23 Feb 2001, Mitchell Hagerty wrote:
> Hey All,
> 
> What would be a good method for inserting data into a blob field
> that contained special characters using perl then retrieving that
> data with php?
> 
> URI::Escape has worked well with perl but now that php has
> gotten into the picture I need a new method.
> 
> any suggestions?
> 
> tks
> mitch
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
Kind Regards,
---
Kyndig
Online Text Game Resource Site:  http://www.kyndig.com
ICQ#10451240


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] special characters with perl,mysql,php

2001-02-23 Thread Joe Stump

What type of special characters?

--Joe

On Fri, Feb 23, 2001 at 08:54:09PM -0600, Mitchell Hagerty wrote:
> Hey All,
> 
> What would be a good method for inserting data into a blob field
> that contained special characters using perl then retrieving that
> data with php?
> 
> URI::Escape has worked well with perl but now that php has
> gotten into the picture I need a new method.
> 
> any suggestions?
> 
> tks
> mitch
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
---


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] special characters with perl,mysql,php

2001-02-23 Thread Mitchell Hagerty

Hey All,

What would be a good method for inserting data into a blob field
that contained special characters using perl then retrieving that
data with php?

URI::Escape has worked well with perl but now that php has
gotten into the picture I need a new method.

any suggestions?

tks
mitch



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Special Characters

2001-01-12 Thread Alex Black

eh?

check out htmlspecialchars()

(I think that's right, from memory)

it basically lets you fuggeddaboutit.

-a


--
Alex Black, Head Monkey
[EMAIL PROTECTED]

The Turing Studio, Inc.
http://www.turingstudio.com

vox+510.666.0074
fax+510.666.0093

Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522




> From: [EMAIL PROTECTED] ("TV Karthick Kumar")
> Newsgroups: php.general
> Date: 12 Jan 2001 06:36:49 -0800
> Subject: [PHP] Special Characters
> 
> Hi all,
> 
> Where can I get all the special characters that can come from a Keyboard
> ?. Is there any site which gives information like that ?.
> 
> I need your help. Thanks in advance.
> 
> ~ Karthick
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Special Characters

2001-01-12 Thread TV Karthick Kumar

Hi all,

Where can I get all the special characters that can come from a Keyboard
?. Is there any site which gives information like that ?.

I need your help. Thanks in advance.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Special Characters

2001-01-11 Thread TV Karthick Kumar

PHP 3.0.17 with Oracle db

Hi all,

I am working on a search functionality where in I dont' get the exact
search results if the user types in a name with special characters like: med
vänlig hälsning, António etc. and characters like: åäö

I dont' know whether there's any built in functions for recognising
these special characters or not. If yes, pls. tell me where can I get the
information about that from ?, and if not, how can I go about it ?. I dont'
want to hard code all the special characters either. Whatever special
characters I enter, it should cross check the database and give me the
results properly. If this is not clear, pls. let me know so that I can
explain you all once again.

Pls. help me out in this issue.

Thanks in advance.

~ Karthick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]