Loading ...
Sorry, an error occurred while loading the content.

110Re: [SubEthaEdit] Special Character Problems

Expand Messages
  • Cole Tierney
    May 4 10:48 AM
      At 1:01 PM +0000 5/4/07, letspetpuppies wrote:
      >If I use a very basic file encoding (like ASCII) then I am warned
      >about the special characters and if I insert as-is they are stripped
      >out. That's not ideal. If I use something like Mac OS Roman, they
      >are pasted into the document, but I have to try to find them and
      >search-and-replace each one. Inevitably, I miss one or two (the
      >dashes are particularly hard), and it adds a round of iteration with
      >the client (the chars get translated to "?" marks or small squares).

      Before you paste the text into the document try running the following

      do shell script "
      pbpaste |
      perl -pe 's/([^[:ascii:]])/sprintf(\"&#%03d;\", ord($1))/eg' |

      That should convert all non ascii characters to their character
      entity equivalents.

    • Show all 4 messages in this topic