X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLocale.pm;h=4fde61654352b5027afef659713c26ef82c2b8b0;hb=1e7d8e31721d592284644da88b3f03ccce98d10c;hp=881d5925e3df2b1db9d0c39d51840b82db2ba8b8;hpb=5923380f58ff189e86e27e6c520c6cd8c50467b5;p=kivitendo-erp.git diff --git a/SL/Locale.pm b/SL/Locale.pm index 881d5925e..4fde61654 100644 --- a/SL/Locale.pm +++ b/SL/Locale.pm @@ -462,14 +462,22 @@ sub remap_special_chars { return $self->quote_special_chars($dst_format, $self->quote_special_chars("${src_format}-reverse", shift)); } +sub raw_io_active { + my $self = shift; + + return !!$self->{raw_io_active}; +} + sub with_raw_io { my $self = shift; my $fh = shift; my $code = shift; + $self->{raw_io_active} = 1; binmode $fh, ":raw"; $code->(); binmode $fh, ":utf8" if $self->is_utf8; + $self->{raw_io_active} = 0; } 1;