SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Jul 2003
    Location
    england
    Posts
    822
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question 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

  2. #2
    SitePoint Wizard bronze trophy
    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.

  3. #3
    SitePoint Guru
    Join Date
    Jul 2003
    Location
    england
    Posts
    822
    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

  4. #4
    SitePoint Wizard bronze trophy
    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.

  5. #5
    SitePoint Guru
    Join Date
    Jul 2003
    Location
    england
    Posts
    822
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Smile

    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
    Attached Images Attached Images


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •