Hi,I have a txt file from winmsd (windows system info) which is in Little-endian UTF-16 Unicode format. I am writing a perl script which suppose to read this file.
Can perl masters in this forum shed some lights to me on how to convert this Little-endian UTF-16 Unicode format to ASCII/UTF-8 without BOM?
I use Encode library but still have problem
use Encode;
while(<DAT>) {
undef $x;
and I have tried both
1) $x= Encode::from_to($_, 'UTF-16LE', 'utf-8');
and
2) $x = encode("UTF-8", $_);
both fails
}
Can perl masters in this forum shed some lights to me on how to convert this Little-endian UTF-16 Unicode format to ASCII/UTF-8 without BOM?
I use Encode library but still have problem
use Encode;
while(<DAT>) {
undef $x;
and I have tried both
1) $x= Encode::from_to($_, 'UTF-16LE', 'utf-8');
and
2) $x = encode("UTF-8", $_);
both fails
}