Jean-Michel Caricand wrote:
>> Hi,
>>
>> I have a problem which is really weird: If a component, which is
>> called from a page (e.g. <& component.mas &>) is saved as utf-8, the
>> output has three strange characters at the end of its content ( ""
>> ). An example can be seen on this page:
>> http://hetzner5.citybeat.de:8080/user/osiris
>>
>> I have not found any answer to this problem. Does someohne know the
>> solution to this problem?
>>
>> A few informations:
>>
>> # uname -a
>> Linux hetzner5 2.6.22-14-server #1 SMP Tue Feb 12 08:27:05 UTC 2008
>> i686 GNU/Linux
>>
>> # lsb_release -a
>> No LSB modules are available.
>> Distributor ID: Ubuntu
>> Description:    Ubuntu 7.10
>> Release:        7.10
>> Codename:       gutsy
>>
>> # perl -v
>>
>> This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
>>
>> And from the apache logs:
>> Apache/2.2.4 (Ubuntu) mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8
>>
>> I'm using the latest HTML::Mason with Cache::Memcached
>>
>> Greetings from germany,
>>
>> Hermann-Marcus Behrens
>>
>> --
>> citybeat.de: Bremens größtes Stadtmagazin im Internet. Mehr als 90.000
>> Besucher monatlich!
>>
>> citybeat.de
>> Zum Huchtinger Bahnhof 13
>> 28259 Bremen
>> Tel:  0421 - 16 80 80 - 0
>> Fax: 0421 - 16 80 80 - 80
>>     
>   
If the actual source of the component is saved as utf8 then you probably 
want to

"use utf8;"

See http://perldoc.perl.org/utf8.html

The |use <http://perldoc.perl.org/functions/use.html> utf8| pragma tells 
the Perl parser to allow UTF-8 in the program text in the current 
lexical scope (allow UTF-EBCDIC on EBCDIC based platforms). The |no 
<http://perldoc.perl.org/functions/no.html> utf8| pragma tells Perl to 
switch back to treating the source text as literal bytes in the current 
lexical scope.

*Do not use this pragma for anything else than telling Perl that your 
script is written in UTF-8.* The utility functions described below are 
directly usable without |use 
<http://perldoc.perl.org/functions/use.html> utf8;| .

Cheers,
Brett

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to