|
|||
|
I am currently working on an intranet system that uses ColdFusion and mySQL,
the system is quite dated, whilst I've been adding and updating features I've come across a strange problem. Simply put, when I insert a ? (GBP) sign into the database (processed with ColdFusion), and then output it using CF, it displays a small square box '?' (as if the font doesn't have that character, Verdana, 10px). I have checked the value in the database using phpMyAdmin, and it displays the GBP sign correctly. The page is using XHTML 1.0 Transitional doctype and 'iso-8859-1' charset. Adding values into the database is done with a simple form, with no processing done from CF apart from a mySQL query to insert the data. Outputting the values is also simple, just grabbing the data from the query and printing it. I have come across this http://www.experts-exchange.com/Soft...rs/ColdFusion/ Q_20983733.html using Google, however I have tried it twice without success. We are running ColdFusion 7 with Windows Server 2003. |
| Sponsored Links |
|
|||
|
On Jul 21, 10:59 am, "Chris Loftus" <webforumsu...@macromedia.com>
wrote: > I am currently working on an intranet system that uses ColdFusion and mySQL, > the system is quite dated, whilst I've been adding and updating features I've > come across a strange problem. > > Simply put, when I insert a ? (GBP) sign into the database (processed with > ColdFusion), and then output it using CF, it displays a small square box '?' > (as if the font doesn't have that character, Verdana, 10px). I have checked the > value in the database using phpMyAdmin, and it displays the GBP sign correctly. > > The page is using XHTML 1.0 Transitional doctype and 'iso-8859-1' charset. > > Adding values into the database is done with a simple form, with no processing > done from CF apart from a mySQL query to insert the data. Outputting the values > is also simple, just grabbing the data from the query and printing it. > > I have come across thishttp://www.experts-exchange.com/Software/Server_Software/Web_Servers/ ... > Q_20983733.html using Google, however I have tried it twice without success. > > We are running ColdFusion 7 with Windows Server 2003. Try UTF-8 encoding |
|
|||
|
Chris Loftus wrote:
> I am currently working on an intranet system that uses ColdFusion and mySQL, what version of mysql? what db driver? > Simply put, when I insert a ? (GBP) sign into the database (processed with > ColdFusion), and then output it using CF, it displays a small square box '?' verdana does contain that glyph but you can also see empty boxes when the encoding is just a bit off. > (as if the font doesn't have that character, Verdana, 10px). I have checked the > value in the database using phpMyAdmin, and it displays the GBP sign correctly. doesn't count--if the db's mangling that data, it's un-mangling it as well. > The page is using XHTML 1.0 Transitional doctype and 'iso-8859-1' charset. if you mean via metaheaders, doesn't matter to cf. > I have come across this > http://www.experts-exchange.com/Soft...rs/ColdFusion/ > Q_20983733.html using Google, however I have tried it twice without success. ignore the metaheader bits, nonsense as far as cf goes (but always add them for forensic reasons, screen readers, etc.). > We are running ColdFusion 7 with Windows Server 2003. ok, cf6 & above default to utf-8, so that's probably where the "minor" encoding mismatch is happening (or the db driver). have you tried <cfset setEncoding("form","iso-8859-1")> to your application.cfm? |
|
|||
|
[Q]what version of mysql? what db driver?[/Q]
MySQL 4.1.22-community-nt [Q]ok, cf6 & above default to utf-8, so that's probably where the "minor" encoding mismatch is happening (or the db driver). have you tried <cfset setEncoding("form","iso-8859-1")> to your application.cfm?[/Q] yep, no change |
|
|||
|
Stressed_Simon wrote:
> Try changing it to £ instead that is the HTML entity for it! depending on the application that's not a good solution. won't sort right, can't be searched for properly (without some form of massaging), etc. and that still leaves the underlying encoding issue which will almost certainly bite him again somewhere down the line. |
|
|||
|
[q]Originally posted by: Newsgroup User
Chris Loftus wrote: > [Q]what version of mysql? what db driver?[/Q] > > MySQL 4.1.22-community-nt and the db driver? what is the db encoding? [/q] Sorry, where can I check this information Paul? |
|
|||
|
Chris Loftus wrote:
> Sorry, where can I check this information Paul? db driver is what you used to setup the dsn for that db (via cfadmin). i'm no mysql expert but try this in either a cfquery or in whatever you use to admin the db: SHOW CREATE DATABASE `DB_NAME` i suspect if you don't know it's whatever the default is. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise