Первый фоллен на хелле (wildkin) wrote in changelog,
Первый фоллен на хелле
wildkin
changelog

[livejournal] r22393: LJSUP-12837: Do not convert numbers to s...

Committer: dnikolaev
LJSUP-12837: Do not convert numbers to strings in LJ::JSON

U   trunk/cgi-bin/LJ/JSON.pm
Modified: trunk/cgi-bin/LJ/JSON.pm
===================================================================
--- trunk/cgi-bin/LJ/JSON.pm	2012-07-05 08:55:13 UTC (rev 22392)
+++ trunk/cgi-bin/LJ/JSON.pm	2012-07-05 09:05:01 UTC (rev 22393)
@@ -76,6 +76,8 @@
     return $class->traverse($what, sub {
         my ($scalar) = @_;
 
+        return $scalar unless Encode::is_utf8($scalar);
+
         # if the string does indeed contain wide characters (which happens
         # in case the source string literals contained chars specified as
         # '\u041c'), encode stuff as utf8

Tags: dnikolaev, livejournal, pm, wildkin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments