Log output is adding extra spaces
Hello, I am trying to write a script that will output a .log file. When I get PowerShell to parse the file with Get-Content, I find that there are extra spaces in the parsing. How can I edit my Intersystems script to output a logfile encoded differently? I think its outputting in unicode by default.
Discussion (2)0
Comments
Nevermind! I found that in powershell if I use the snippet below, PS will intake the file as the listed encoding. In my case, CTerm was outputting UTF8. I brought that file into PS using Unicode, and it removed the extra spaces.
(Get-Content -Path <filepath.txt> -Encoding Unicode)If someone else stumbles across question in the future:
Some encoding values supported are:
- Unicode
- Byte
- BigEndianUnicode
- UTF8
- UTF7
- UTF32
- Ascii
- BigEndianUTF32