Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 119992
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: victor [...] vsespb.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: use locale in template::filters
Seeing warnings like Wide character (U+434) in substitution (s///) at /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/Template/Filters.pm line 62 Perldiag tells: ==== Wide character in %s (S utf8) Perl met a wide character (>255) when it wasn't expecting one. This warning is by default on for I/O (like print). The easiest way to quiet this warning is simply to add the :utf8 layer to the output, e.g. binmode STDOUT, ':utf8' . Another way to turn off the warning is to add no warnings 'utf8'; but that is often closer to cheating. In general, you are supposed to explicitly mark the filehandle with an encoding, see open and binmode. ==== If I remove 'use locale' from T::F, warning gone. So why is it there and how to use it with unicode strings?
Ticket migrated to github as https://github.com/abw/Template2/issues/137