adsb has asked for the wisdom of the Perl Monks concerning the following question:
The characters on the second line are always the final n characters from the first, where n is the number of non-ASCII characters in the string; I'm therefore guessing this is a bytes vs characters issues. Could anyone suggest a solution?* l'été sera chaud ud
#!/usr/bin/perl use strict; use warnings; use open ':utf8'; use Encode 'decode_utf8'; my $CHGLINE = decode_utf8(join(" ", @ARGV)); open O, ">testout"; format O = * ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $CHGLINE ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $CHGLINE . write O; close O;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Format eating too few characters with utf-8?
by ikegami (Patriarch) on Apr 01, 2008 at 20:00 UTC | |
|
Re: Format eating too few characters with utf-8?
by jdporter (Paladin) on Apr 01, 2008 at 23:16 UTC | |
by adsb (Initiate) on Apr 02, 2008 at 06:05 UTC |