Re: PHP/MySQL + 'special' characters
| From: | joe at jWebMedia dot com | Date: | Wed, 06 Sep 2000 14:49:14 +0000 |
| Subject: | Re: PHP/MySQL + 'special' characters | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2660@lists.php.net to get a copy of this message | ||
I'm not crazy enough to use any sort of MS product unless absolutely necessary.
It's NiftyTelnetSSH for Mac. I haven't tried any other Telnet app yet, but I will
if I find another nice secure telnet app for Mac. Anyone have any suggestions?
Joe
Gavster wrote:
> Hmmmm . . . that's an interesting feature - is that telnet a MS product? LOL
>
> I think you are correct though - it sounds like your telnet may be
> hiccupping. Have you tried it using a different telnet program?
>
> At 08:37 AM 09/06/00 -0500, you wrote:
> >Here's what I've found on this - MySQL doesn't seem to require any special
> >escaping or anything. If I input an accent in a text field through the web
> >interface, magic_quotes seems to take care of it, if I insert it straight
> >to the
> >DB through phpMyAdmin, it works just fine, also. However, if I try to input a
> >'special' character through the MySQL Table Monitor via Telnet, it barfs. It
> >seems more like my Telnet app won't handle the character as opposed to MySQL.
> >Strange...
> >
> >Joe
> >
> >
> >
> >Gavster wrote:
> >
> > > Hmmm . . . yeah, you got me there . . . one way to find out, though . . .
> > >
> > > Try writing a little test function and run a string full of special chars
> > > through it and see what happens. . . .
> > >
> > > Just remember that for each field in your database that you insert data
> > > into with the addslashes() function, it's recommended that you adjust the
> > > field size to [(current_field_size x 2) + 1]. This is due to the
> > > theoretical possibility that every char in the field will be modified with
> > > a slash in front of it.
> > >
> > > Cheers,
> > >
> > > Gavster
> > >
> > > At 05:10 PM 09/05/00 -0500, you wrote:
> > > >That may work, however, one big concern right now is getting some tab
> > > >delimited
> > > >text into the DB as well, so how MySQL will handle it is a problem. The
> > > >server has
> > > >magic_quotes on, so that should hopefully help with data from the web.
> > > >Will that
> > > >take care of the accent issue, or do I need to locally turn off
> > > >magic_quotes and
> > > >do addslashes()? thanks,
> > > >
> > > >Joe
> > > >
> > > >Gavster wrote:
> > > >
> > > > > Yo Joe,
> > > > >
> > > > > Did you try the addslashes() function?
> > > > >
> > > > > At 04:56 PM 09/05/00 -0500, you wrote:
> > > > > >Actually, I can't use this because I need to have the user input
> > > > > >the
> > > > data so I
> > > > > >can't count on them to do this. Anyway, I did try to do this once
> > > > > >and
> > > > it still
> > > > > >freaked...any other ideas? Thanks
> > > > > >
> > > > > >John Guynn wrote:
> > > > > >
> > > > > > > Have you tried escaping the character when you enter it? In
> > > > > > > other
> > > > > > words put
> > > > > > > a \ before the character MySQL balks at. That simple fix has
> > > > > > > saved
> > > > me many
> > > > > > > headaches recently.
> > > > > > >
> > > > > > > John Guynn
> > > > > >
> > > > > >
> > > > > >--
> > > > > >PHP Database Mailing List (http://www.php.net/)
> > > > > >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > > > > >For additional commands, e-mail: php-db-help@lists.php.net
> > > > > >To contact the list administrators, e-mail:
> > php-list-admin@lists.php.net