SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    extended characters from different OSs

    I have a problem where people are copying a pasting extended characters into an administrations screen from various programs and OS's. Now I've got the trademark symbol in the data base several different ways and I can't seam to weed them all out. To add the confusion, I've recently converted the site to use utf-8.

    I've tried to run my copy through this sort of function:

    function myhtmlentities($str) {
    $tbl[""]="™";
    $tbl[chr(153)]="™";
    $tbl[chr(250)]="™";
    $tbl[chr(170)]="™";
    $tbl[chr(168)]="®;";
    $tbl[chr(174)]="®;";

    return str_replace(array_keys($tbl),array_values($tbl),$str);
    }

    But it's not really helping. I'd love some ideas on how to clean this mess up.

    thanks
    summer

  2. #2
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    htmlentities() doesn't work?

    --
    Mario


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
  •