You are the man, Ulrich!
It works perfectly.
Thank you so much for helping me here.. I can keep the rest of my hair...
Yossi
Announcement
Collapse
No announcement yet.
convert ANSI string to UTF-8
Collapse
X
-
If you are redirecting the output via >, then you may need to use cmd.exe /c to call the command.
Ulrich
Leave a comment:
-
convert ANSI string to UTF-8
Hi,
I am trying to write string (with non-latin text) from AMS to a html file. As AMS works in ANSI and the html file is UTF-8 encoded, I need a way to convert that string from ANSI (windows-1255 in my case) to UTF-8.
After a lot of trial and error, I found win_iconv, a command line exe which can do that but from one file to another.
I checked that it works in a console window, it reads a input txt file, converts it and writes back a output txt file, now UTF-8 encoded.
But using File.Run in AMS, the output file is not written.
The Action I use is:
File.Run("AutoPlay\\Docs\\win_iconv\\win_iconv.exe ", '-f windows-1255 -t utf-8 '.._TempFolder..'\\ansiFile.txt > '.._TempFolder..'\\utf8File.txt', "", SW_SHOWNORMAL, true);
I would appreciate any help...
Best would be NOT having to go via external files, of course, but I can "live with that" if it works...
Thanks
YossiTags: None
Leave a comment: