File: fix-utf8.patch

package info (click to toggle)
libfrontier-rpc-perl 0.07b4-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 224 kB
  • ctags: 107
  • sloc: perl: 786; sh: 82; xml: 49; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 568 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Make utf8 compliant, from Erwan MAS <erwan@mas.nom.fr>
Bug-Debian: http://bugs.debian.org/393204
Forwarded: no
Author: Maurizio Lemmo (Tannoiser) <tannoiser@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2011-02-13

--- a/lib/Frontier/RPC2.pm
+++ b/lib/Frontier/RPC2.pm
@@ -234,6 +234,7 @@
 	return ("<value><double>$value</double></value>");
     } else {
 	$value =~ s/([&<>\"])/$char_entities{$1}/ge;
+  $value =~ s/([\x{80}-\x{FFFF}])/'&#' . ord($1) . ';'/gse;
 	return ("<value><string>$value</string></value>");
     }
 }