[uim-commit] r899 - trunk/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Mon Jun 20 13:39:37 PDT 2005


Author: yamaken
Date: 2005-06-20 13:39:35 -0700 (Mon, 20 Jun 2005)
New Revision: 899

Modified:
   trunk/scm/util.scm
Log:
* scm/util.scm
  - (ucs-to-utf8-string): Cosmetic change


Modified: trunk/scm/util.scm
===================================================================
--- trunk/scm/util.scm	2005-06-20 17:27:00 UTC (rev 898)
+++ trunk/scm/util.scm	2005-06-20 20:39:35 UTC (rev 899)
@@ -673,15 +673,16 @@
 
 
 ;; FIXME: write test.
-(define (ucs-to-utf8-string ucs)
-  (let ((utf-8
-	 (if (< ucs 128)
-	     (list ucs)		; ASCII
-	     (let enc ((to-be-split ucs)
-		       (threshold 64))
-	       (if (< to-be-split threshold)
-		   (list (bit-or to-be-split
-				 (bit-xor 255 (- (* 2 threshold) 1))))
-		   (cons (bit-or 128 (bit-and 63 to-be-split))
-			 (enc (/ to-be-split 64) (/ threshold 2))))))))
-    (string-append-map charcode->string (reverse utf-8))))
\ No newline at end of file
+(define ucs-to-utf8-string
+  (lambda (ucs)
+    (let ((utf-8
+	   (if (< ucs 128)
+	       (list ucs)		; ASCII
+	       (let enc ((to-be-split ucs)
+			 (threshold 64))
+		 (if (< to-be-split threshold)
+		     (list (bit-or to-be-split
+				   (bit-xor 255 (- (* 2 threshold) 1))))
+		     (cons (bit-or 128 (bit-and 63 to-be-split))
+			   (enc (/ to-be-split 64) (/ threshold 2))))))))
+      (string-append-map charcode->string (reverse utf-8))))



More information about the uim-commit mailing list