[47206] trunk/base/src/port/portindex.tcl

jmr at macports.org jmr at macports.org
Mon Feb 23 05:55:48 PST 2009


Revision: 47206
          http://trac.macports.org/changeset/47206
Author:   jmr at macports.org
Date:     2009-02-23 05:55:48 -0800 (Mon, 23 Feb 2009)
Log Message:
-----------
portindex: use 'string bytelength' instead of 'string length', so UTF-8 characters in the PortInfo don't break the code that reads the PortIndex

Modified Paths:
--------------
    trunk/base/src/port/portindex.tcl

Modified: trunk/base/src/port/portindex.tcl
===================================================================
--- trunk/base/src/port/portindex.tcl	2009-02-23 13:53:55 UTC (rev 47205)
+++ trunk/base/src/port/portindex.tcl	2009-02-23 13:55:48 UTC (rev 47206)
@@ -69,7 +69,7 @@
         }
         
         set output [array get portinfo]
-        set len [expr [string length $output] + 1]
+        set len [expr [string bytelength $output] + 1]
         puts $fd [list $portinfo(name) $len]
         puts $fd $output
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090223/b6661a2c/attachment.html>


More information about the macports-changes mailing list