The following code does not do what I expect.
It is intended to:
so basically it is similiar in nature to a plain old copy.
use Unicode::String; $o_in = 'in.txt'; $o_out = 'out.txt'; # get the input data into utf16 objects open ( F, $o_in ) || die; while (<F>) { push ( @raw, utf16($_)); } close (F) || die; # get a list of hex values for the data map { push (@hexout, $_->hex) } @raw; # now create an empty utf16 object Unicode::String->stringify_as( 'utf16' ); my $outo = Unicode::String->new(); # and define its hex values $outo->hex ( join '', @hexout); # dump the hex values open ( F, ">$o_out" ) || die; print F $outo; close (F) || die;
But my input file differs from my output file.
Does anyone have any idea why?
Thanks in advance
In reply to Re: Search and replace in Unicode files
by bm
in thread Search and replace in Unicode files
by bm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |