in reply to use bytes and length problem
You might try,
my $size = scalar unpack'C*', $txt;
A quick check on some content grabs from UTF websites shows a difference between the counts from that and
my $size = scalar unpack'U*', $txt;
using 5.6.1 and 5.8 (AS).
Also, the filesize shown by the OS of the same content written in binmode is same as the first above.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: use bytes and length problem
by muad33b (Acolyte) on Mar 02, 2003 at 15:29 UTC | |
by BrowserUk (Patriarch) on Mar 02, 2003 at 16:28 UTC | |
by pfaut (Priest) on Mar 02, 2003 at 15:51 UTC | |
by muad33b (Acolyte) on Mar 02, 2003 at 16:00 UTC |