MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Removing strange characters from mathgroup postings

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118203] Removing strange characters from mathgroup postings
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Sat, 16 Apr 2011 07:35:05 -0400 (EDT)

Oftentimes copying from Mathematica to the mathgroup goes awry and
strange characters combinations that look like "=AE" and such are
sprinkled throughout the text.

If you ever encounter this situation (e.g., as in
http://forums.wolfram.com/mathgroup/archive/2009/Feb/msg00250.html)
the following function will decode it (in all the cases that I
tested).

    translateQuotedPrintable[str_String] :=
      StringReplace[str, {"=" ~~
c1:HexadecimalCharacter~~c2:HexadecimalCharacter :>
        FromCharacterCode[FromDigits[c1 <> c2, 16], "Math1"],"=" ~~
EndOfLine -> ""}]

Just paste the whole posting between quotes in
translateQuotedPrintable[" ... "] and the post will be cleaned up.

Cheers -- Sjoerd


  • Prev by Date: Re: SortBy
  • Next by Date: Re: concatenate matrices?
  • Previous by thread: Re: Another AppendTo replacement problem
  • Next by thread: Re: Removing strange characters from mathgroup postings