Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1718

Removing strange characters from mathgroup postings

From "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Removing strange characters from mathgroup postings
Date 2011-04-16 11:35 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iobuun$be3$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Removing strange characters from mathgroup postings "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-04-16 11:35 +0000

csiph-web