LP1642721 SIP Ubuntu 16.04 Encode issue decode_utf8 user/blake/LP1642721_SIP_Ubuntu_16.04_Encode_issue_decode_utf8
authorblake <blake@mobiusconsortium.org>
Thu, 17 Nov 2016 20:04:16 +0000 (14:04 -0600)
committerblake <blake@mobiusconsortium.org>
Thu, 17 Nov 2016 20:04:16 +0000 (14:04 -0600)
New versions of Encode.pm do not allow decoding already decoded strings.
This change fixed our SIP server in production.

Signed-off-by: blake <blake@mobiusconsortium.org>
Open-ILS/src/perlmods/lib/OpenILS/SIP.pm

index 81307f4..9f602af 100644 (file)
@@ -150,7 +150,7 @@ sub clean_text {
     # and latin-1 encodings (at least) require this to substitute
     # characters rather than simply returning a string truncated
     # after the first non-ASCII character
-    $text = NFD(decode_utf8($text));
+    $text = NFD($text);
 
     if ($target_encoding eq 'ascii') {