From 7fdb4d21d62674b29958022840aea2c2f82ef97c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Jan 2016 16:59:22 +0000 Subject: [PATCH] Bug 15487: Fix encoding issue on localization MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It has been introduced commit ed0ff59152a41f6690b480d0b13b607250678418 Bug 11559: Supporting changes for Rancor Pushed at the same time as bug 14100. Test plan: Add/update translations for item types, confirm there is no encoding issues. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- svc/localization | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/svc/localization b/svc/localization index 2bf3c6901d..1f10f6734b 100755 --- a/svc/localization +++ b/svc/localization @@ -13,11 +13,11 @@ sub get_translations { my @translations; while ( my $s = $rs->next ) { push @translations, { - id => Encode::encode( 'utf-8', $s->localization_id ), - entity => Encode::encode( 'utf-8', $s->entity ), - code => Encode::encode( 'utf-8', $s->code ), - lang => Encode::encode( 'utf-8', $s->lang ), - translation => Encode::encode( 'utf-8', $s->translation ), + id => $s->localization_id, + entity => $s->entity, + code => $s->code, + lang => $s->lang, + translation => $s->translation, } } $response->param( translations => \@translations ); @@ -47,11 +47,11 @@ sub update_translation { } $response->param( %params, - id => Encode::encode('utf-8', $localization->localization_id), - entity => Encode::encode('utf-8', $localization->entity), - code => Encode::encode('utf-8', $localization->code), - lang => Encode::encode('utf-8', $localization->lang), - translation => Encode::encode('utf-8', $localization->translation), + id => $localization->localization_id, + entity => $localization->entity, + code => $localization->code, + lang => $localization->lang, + translation => $localization->translation, ); C4::Service->return_success( $response ); } @@ -73,11 +73,11 @@ sub add_translation { ); $localization->store; $response->param( - id => Encode::encode('utf-8', $localization->localization_id), - entity => Encode::encode('utf-8', $localization->entity), - code => Encode::encode('utf-8', $localization->code), - lang => Encode::encode('utf-8', $localization->lang), - translation => Encode::encode('utf-8', $localization->translation), + id => $localization->localization_id, + entity => $localization->entity, + code => $localization->code, + lang => $localization->lang, + translation => $localization->translation, ); } else { -- 2.39.5