Hello,
I have a function which searches and replaces characters on file. It works with ASCI sharacters, but not when the strings which needs to be replaced contains Unicode ('á', 'ā') etc. The source file is codding
utf8 .
$SearchReplace = @($file)
#Process files by performing a search and replace
foreach ($file in $SearchReplace)
{
#Select-Object -Skip 1 |
(Get-Content $file) |
Foreach-object { $_ -replace 'unicode_string' , ';' } |
out-file -encoding Unicode $file
}
How to get working the search (and replace) function with Unicode characters?
Thanks!