use UTF8 JSON encoding and decoding universally

fixed: Import/Export of packages with international text is broken
This commit is contained in:
Graham Knop 2008-04-01 14:42:20 +00:00
parent 35bfeac0ef
commit 9ed284beec
16 changed files with 42 additions and 40 deletions

View file

@ -19,7 +19,7 @@ use base 'WebGUI::Asset::File::GalleryFile';
use Carp qw( carp croak );
use Image::ExifTool qw( :Public );
use JSON qw/ to_json from_json /;
use JSON qw/ encode_json decode_json /;
use URI::Escape;
use Tie::IxHash;
@ -176,7 +176,7 @@ sub getExifData {
my $self = shift;
return unless $self->get('exifData');
return from_json( $self->get('exifData') );
return decode_json( $self->get('exifData') );
}
#----------------------------------------------------------------------------
@ -397,7 +397,7 @@ sub updateExifDataFromFile {
}
$self->update({
exifData => to_json( $info ),
exifData => encode_json( $info ),
});
}