Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #include <Array.au3>
- $fileCSV = @ScriptDir & "\test.csv"
- $fileCSVinArray = FileReadToArray($fileCSV)
- $fileCSVinString = _ArrayToString($fileCSVinArray, @CRLF)
- $fileCSVinString = StringStripWS($fileCSVinString, 4) ;remove double (or more) spaces between words
- #cs
- List of dangerous characters and their safe alternatives:
- ' ' => '%20', '!' => '%21', '"' => '%22',
- '#' => '%23', '$' => '%24', '%' => '%25',
- '&' => '%26', '\'' => '%27', '(' => '%28',
- ')' => '%29', '*' => '%2A', '+' => '%2B',
- ',' => '%2C', '-' => '%2D', '.' => '%2E',
- '/' => '%2F', ':' => '%3A', ';' => '%3B',
- '<' => '%3C', '=' => '%3D', '>' => '%3E',
- '?' => '%3F', '@' => '%40', '[' => '%5B',
- '\\' => '%5C', ']' => '%5D', '^' => '%5E',
- '_' => '%5F', '`' => '%60', '{' => '%7B',
- '|' => '%7C', '}' => '%7D', '~' => '%7E',
- #ce
- Local $fromTo[9][2] = [["""", ""] _
- , [@TAB, ""] _
- , ["; ", ";"] _
- , [" ;", ";"] _
- , [" ", "%20"] _
- , ["/", "%2F"] _
- , ["\", "%27"] _
- , ["+", "%2B"] _
- , ["-", "%2D"]]
- For $i = 0 to UBound($fromTo, 1) - 1 ;rows
- For $j = 0 to UBound($fromTo, 2) - 1 ;columns
- $fileCSVinString = StringReplace($fileCSVinString, $fromTo[$i][0], $fromTo[$i][1])
- Next
- Next
- ClipPut($fileCSVinString) ;or FileWrite...
Add Comment
Please, Sign In to add comment