I’m trying to return the contents of a text file as a property. When I return using lines of file, I get the percent encoded version as follows using the HOSTS file as an example
The percent encoding occurs if the client or console can’t properly display the character. In this case the “tab” can’t be shown properly in the console so it shows as percent encoded. There is no way for you to display the tab, but you can switch it out with three spaces by adding a query like:
concatenation " " of substrings separated by “%09” of …
For instance:
q: concatenation " " of substrings separated by “%09” of (“test%09test”)
A: test test
That worked to remove the %09’s but it also removed the line breaks from the results. How can I get the line breaks returned?
Here’s what I’m currently using:
Q: concatenation " " of substrings separated by “%09” of lines whose (it does not start with “#”) of file (pathname of system folder & “\drivers\etc\hosts”)
(concatenation " " of substrings separated by “%09” of it) of lines whose (it does not start with “#”) of file (pathname of system folder & “\drivers\etc\hosts”)