SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Apr 10, 2009, 21:21 #1
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Odd Character before Registered Mark
I have info. stored on a dbase (MySQL). Within the table (MySQL) the Registered character displays correctly. On the web page, there this 'Â' before the Registered character. Where's this coming from and how do I fix this?
toad78
-
Apr 10, 2009, 21:51 #2
- Join Date
- Jul 2008
- Posts
- 5,757
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You mean the ® symbol?
Probably the easiest way to explain it would be to just use the html entity, ®
The source of this problem is likely because the character set advertised by your script(the content-type: http header) does not match the character set of the data you put into the database. For example, you would probably want to use utf8 if you want to display that character without having to use an html entity.
-
Apr 10, 2009, 22:06 #3
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
After changing the charset to utf-8 on the document it has caused MASSIVE preg_replace errors (I have a borrowed PHP function that creates urls automatically using preg_replace).
To be brief, the client adds records to a database via a form. Information recorded is displayed on a public web page. I appreciate some advice.
Thank you,
toad78
-
Apr 10, 2009, 22:11 #4
- Join Date
- Jul 2008
- Posts
- 5,757
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You need to provide more info.
error messages + code + how to reproduce your problem.
-
Apr 10, 2009, 22:40 #5
- Join Date
- Jul 2003
- Location
- england
- Posts
- 823
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
If the charset is iso-8859-1, the problem looks like the attached file. If I use UTF-8, I get a series of these errors:
"Warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in C:\htdocs\... on line 73
Website: (website address goes here)"
I hope this helps.
toad78
Bookmarks