System text encoding getencoding12/27/2022 ![]() ![]() ![]() Sadly, the IE crashed when the input file was too big. My colleague solved this by opening this file in Internet Explorer, and save the output as a textġ23456789|A|AA-A|123456879|surname|firstname|||11111 - AAA|123456789|0101|||| Our software can export some "sensitive" data in txt format (code page CP-1252),īut when i edit the file via normal text editor (notepad), there were no breaklines (CLRF?) after ||||. Thanks a lot David, it worked like a charm. (Presumably, you're doing something with the content rather than just creating a copy of the file this code was just for example purposes.) To call it, you'd have to create an instance of to pass in to the functions: $streamWriter = New-Object System.IO.StreamWriter($Path, $false, $Encoding) $Path = $PSCmdlet.GetUnresolvedProviderPathFromPSPath($Path) $Path = Join-Path -Path $ -ChildPath $Path Something like this could work: function Get-M圜ontent Exactly how you do that depends on what you need to do with the contents of the file. I don't believe the PowerShell cmdlets work that way, but you can always use the. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |