Percent encoded results

(imported topic written by jeko1791)

Hi,

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

127.0.0.1 localhost

1.2.3.4%09bigfix.mydomain.com

5.6.7.8%09www.mydomain.com

How can I return this text as a property without the percent encoding?

(imported comment written by BenKus)

Hi jeko17,

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

Ben

(imported comment written by jeko1791)

Thanks Ben.

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”)

A: 127.0.0.1 localhost 1.2.3.4 bigfix.mydomain.com 5.6.7.8 www.mydomain.com

(imported comment written by jessewk)

(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”)

(imported comment written by jeko1791)

That did it. Many thanks!