in reply to Escape special characters for a LaTeX file
You're working much too hard :)
#! perl -w use strict; while( <DATA> ) { s!([%&_~{}^#\\])!\\$1!g; print; } __DATA__ "% & _ ~ { } ^ # \ " "Sonntag, 26.05.2013 - 13:13:27","0","Lieber Herr % , & text text with + some %special characters" "Sonntag, 26.05.2013 - 13:35:47","1","Sehr gerne! ^ _~}# and here some + other characters" "Sonntag, 26.05.2013 - 13:49:15","0",":-))" "Mittwoch, 05.06.2013 - 18:12:09","0","Besten Dank, & hat prima geklap +pt. {Greetings!}" "Mittwoch, 05.06.2013 - 19:16:47","1","% _ text text!" "Mittwoch, 05.06.2013 - 19:17:30","0","~Prima! #Danke!!" "Samstag, 08.06.2013 - 09:21:09","1","_ 10. Jul Text text %" "Samstag, 08.06.2013 - 10:08:45","0","Ja, osaka ffm lh 741 & ffm muc l +h 114 abflug 16:00"
C:\test>junk "\% \& \_ \~ \{ \} \^ \# \\ " "Sonntag, 26.05.2013 - 13:13:27","0","Lieber Herr \% , \& text text wi +th some \%special characters" "Sonntag, 26.05.2013 - 13:35:47","1","Sehr gerne! \^ \_\~\}\# and here + some other characters" "Sonntag, 26.05.2013 - 13:49:15","0",":-))" "Mittwoch, 05.06.2013 - 18:12:09","0","Besten Dank, \& hat prima gekla +ppt. \{Greetings!\}" "Mittwoch, 05.06.2013 - 19:16:47","1","\% \_ text text!" "Mittwoch, 05.06.2013 - 19:17:30","0","\~Prima! \#Danke!!" "Samstag, 08.06.2013 - 09:21:09","1","\_ 10. Jul Text text \%" "Samstag, 08.06.2013 - 10:08:45","0","Ja, osaka ffm lh 741 \& ffm muc +lh 114 abflug 16:00"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Escape special characters for a LaTeX file
by Anonymous Monk on Dec 14, 2014 at 10:40 UTC |