List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 13 2003 9:58pm
Subject:Re: Html entities and MySql, this is a confusing one to me.
View as plain text  
At 13:51 -0800 1/13/03, Scott Haneda wrote:
>Was working on a database job last night, and ran into a little stumbling
>block, hope all this comes though in email, if you see a ® it is a
>"registered mark" just in case the email clients out there change it around.
>
>So I have a simple database, one table, and say one field, varchar(14) and
>in it I put hello®, I use html input form elements and a middleware called
>WebSiphon, I have also done this in php with phpmyadmin as well, the
>character shows up on display in the Browser as a "registered mark", as well
>as in phpmyadmin, all good so far.
>
>Now, in my shell in the mysql prompt, or on a dump of the data, the
>"registered mark" is not what it should be, here is a example.
>
>mysql> select name from custom_bikes;
>+--------------------------------+
>| name                           |
>+--------------------------------+
>| 2002 FAT BOYÆ, FLSTF -         |
>| 2002 V-RODÆ, VRSCA -           |
>| 2002 ROAD KINGÆ FLHR -         |
>| 2002 FAT BOYÆ, FLSTF -         |
>| 2002 FAT BOYÆ, FLSTFI -        |
>| 2002 DYNA WIDE GLIDEÆ, FXDWG - |
>| 2002 SOFTAILÆ DEUCE, FXSTDI -  |
>| 2002 V-RODÆ, VRSCA             |
>| 2002 FAT BOYÆ FLSTFI           |
>| 2002 SOFTAILÆ STANDARD, FXST   |
>+--------------------------------+
>
>Where the Æ should be a ®

How do you know this isn't simply a failure of your terminal window
to display the character properly?  That's the most likely problem
here, not that your data are stored incorrectly.

>
>So in my middleware, I have made a function called encodeHTML(string)
>And of course it does not work to convert the ® to ® for propper html
>display in a browser.  Granted, most browsers are forgiving, but I consider
>this muddy data in MySql and would like the correct data in there.
>
>Thanks for any help.
>
>-------------------------------------------------------------
>Scott Haneda                                Tel: 415.898.2602
>http://www.newgeo.com                       Fax: 313.557.5052
>scott@stripped                            Novato, CA U.S.A.

Thread
replication - queries out of order or dropped?David Nedved13 Jan
  • Html entities and MySql, this is a confusing one to me.Scott Haneda13 Jan
    • Re: Html entities and MySql, this is a confusing one to me.Paul DuBois13 Jan
      • Re: Html entities and MySql, this is a confusing one to me.Scott Haneda13 Jan
        • Re: Html entities and MySql, this is a confusing one to me.Scott Haneda14 Jan
  • Re: replication - queries out of order or dropped?Jeremy Zawodny14 Jan
    • Re: replication - queries out of order or dropped?David Nedved14 Jan
      • Re: replication - queries out of order or dropped?Jeremy Zawodny15 Jan
        • Re: replication - queries out of order or dropped?Martin Waite15 Jan
          • Re: replication - queries out of order or dropped?David Nedved15 Jan