Invalid Characters, XML...

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Invalid Characters, XML...

    Im using PHP to write to XML files, but I am having some problems. A lot
    of users are cutting and pasting content from text editors like word,
    which uses odd quotation marks, dashes, etc. which PHP writes to the XML
    file, and then the XML parser does not under stand. Is there a
    stripslashes() or htmlspecialchars() equivalent that will convert this
    kind of stuff to the correct ascii text?

    Russ

    Russell P Jones Guest

  2. Similar Questions and Discussions

    1. error invalid characters in my cfquery?
      The list. What is that datatype your passing the list to? Is it an numeric based or string? If it is a string (char, varchar, ntext, nvarchar,...
    2. Using Invalid Characters
      I am using MS SQL for my ASP application and have several 'comments' fields. Obviously in these fields users are going to enter invalid characters...
    3. Matching invalid characters in a URL
      I'm trying to throw out URLs with any invalid characters in them, like '@". According to http://www.ietf.org/rfc/rfc1738.txt : Thus, only...
    4. #25405 [Opn->Bgs]: The session id contains invalid characters
      ID: 25405 Updated by: iliaa@php.net Reported By: pop501 at hotmail dot com -Status: Open +Status: ...
    5. [PHP] Invalid Characters, XML...
      Here's what I have been using. $trans= array("'" => "&#39;", "'" => "&#39;",">" => "&#62;", "<" => "&#60;", "&" => "&#38;","-" => "&#45;", "°" => "&#176;", "±" => "&#177;", "-"...
  3. #2

    Default Clarification..... UTF-8 Enccoding .....


    Any idea on how to get rid of Windows chracters. I have paroblem with
    users cutting and pasting out of Microsoft Word into textarea's and
    input-boxes and the special characters like quotations and apostrophes
    messing up the xml...


    Thanks


    Russ


    Russell P Jones Guest

  4. #3

    Default Re: [PHP] Clarification..... UTF-8 Enccoding .....

    Hi,

    Monday, August 4, 2003, 2:03:57 PM, you wrote:

    RPJ> Any idea on how to get rid of Windows chracters. I have paroblem with
    RPJ> users cutting and pasting out of Microsoft Word into textarea's and
    RPJ> input-boxes and the special characters like quotations and apostrophes
    RPJ> messing up the xml...


    RPJ> Thanks


    RPJ> Russ

    I do this before feeding it to xml

    $description = iconv("ISO-8859-1","UTF-8",$description);

    --
    regards,
    Tom

    Tom Rogers Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139