Revision 8c051f47
Von Moritz Bunkus vor etwa 14 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
39 | 39 |
|
40 | 40 |
use Carp; |
41 | 41 |
use Data::Dumper; |
42 |
use Encode; |
|
42 | 43 |
use SL::DBUtils; |
43 | 44 |
|
44 | 45 |
use strict; |
... | ... | |
1315 | 1316 |
close(TEMPLATE); |
1316 | 1317 |
} |
1317 | 1318 |
|
1319 |
$content = Encode::decode('utf-8-strict', $content) if $::locale->is_utf8; |
|
1320 |
|
|
1318 | 1321 |
$main::lxdebug->leave_sub(); |
1319 | 1322 |
|
1320 | 1323 |
return ($content, $lines); |
... | ... | |
1330 | 1333 |
my $error = ""; |
1331 | 1334 |
|
1332 | 1335 |
if (open(TEMPLATE, ">$filename")) { |
1336 |
$content = Encode::encode('utf-8-strict', $content) if $::locale->is_utf8; |
|
1333 | 1337 |
$content =~ s/\r\n/\n/g; |
1334 | 1338 |
print(TEMPLATE $content); |
1335 | 1339 |
close(TEMPLATE); |
Auch abrufbar als: Unified diff
Bearbeiten von Druckvorlagen: Perl-Encoding richtig beachten