I have the below code to retrieve a Japanese or localized string from an mht file. i have used almost all the encoding params listed here(unknown,string,unicode,bigendianunicode,utf8,utf7,utf32,ascii,default,oem) and verified. it always prints the junk characters instead of original Chinese or Japanese name
$log = "c:\scripts\meta.mht"
$patt = 'title'
$indx = Select-String $patt $log | ForEach-Object {$_.LineNumber}
write-host (Get-Content $log)[$indx] | out-file -encoding string c:\scripts\temp1.xml
can some one help me how to print the localized string? which encoding param should i use? i have tried with all the listed params but no luck (unknown,string,unicode,bigendianunicode,utf8,utf7,utf32,ascii,default,oem)
thanks in advance.