develooper Front page | perl.perl5.porters | Postings from May 2004

Re: [perl #29553] using 8-bit character in Format triggers error

Thread Previous
From:
H.Merijn Brand
Date:
May 14, 2004 05:37
Subject:
Re: [perl #29553] using 8-bit character in Format triggers error
Message ID:
20040514143405.A670.H.M.BRAND@hccnet.nl
On Thu 13 May 2004 13:51, "Ulrich Windl" (via RT) <perlbug-followup@perl.org> wrote:
> Perl emits the following error:
> syntax error at /home/windl/src/Perl/p301inq.pl line 100, next char ;
> Unrecognized character \xF6 at /home/windl/src/Perl/p301inq.pl line 100.
> 
> for this format:
> 
> format STDOUT_TOP =
> ===============================================================================
> Empfangene Nachrichten von IK @<<<<<<<<<<<<<<                         Seite @##
> -------------------------------------------------------------------------------
> @header,                                                                    $%
> Auftragsdatei  Fehler  Info    Dateiname   Größe         Nummer
> Erstellt            Datum gesendet      Datum empf. Start   Datum empf. Ende
> ===============================================================================

Though it might be an error, you can easily `work around' the misbehaviour
like thgis:

my $gr = "Größe";

format STDOUT_TOP =
===============================================================================
Empfangene Nachrichten von IK @<<<<<<<<<<<<<<                         Seite @##
-------------------------------------------------------------------------------
@header,                                                                    $%
Auftragsdatei  Fehler  Info    Dateiname   @<<<<         Nummer
                                           $gr
Erstellt            Datum gesendet      Datum empf. Start   Datum empf. Ende
===============================================================================
.

> Using "use locale;" and/or setting $LANG does not change things.

That's because they both deal with variable data, not with the constant
expression for format

> I think this is a bug; 8-bit characters should be supported.

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.3, & 5.9.x, and 809 on  HP-UX 10.20 & 11.00, 11i,
   AIX 4.3, SuSE 9.0, and Win2k.           http://www.cmve.net/~merijn/
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About