[前][次][番号順一覧][スレッド一覧]

ruby-changes:5241

From: naruse <ko1@a...>
Date: Mon, 2 Jun 2008 04:36:43 +0900 (JST)
Subject: [ruby-changes:5241] Ruby:r16739 (trunk): * enc/gb18030.c (gb18030_code_to_mbc): add 0x80000000

naruse	2008-06-02 04:36:28 +0900 (Mon, 02 Jun 2008)

  New Revision: 16739

  Modified files:
    trunk/ChangeLog
    trunk/enc/gb18030.c

  Log:
    * enc/gb18030.c (gb18030_code_to_mbc): add 0x80000000
      for 4bytes character.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16739&r2=16738&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/gb18030.c?r1=16739&r2=16738&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16738)
+++ ChangeLog	(revision 16739)
@@ -1,3 +1,8 @@
+Mon Jun  2 04:35:32 2008  NARUSE, Yui  <naruse@r...>
+
+	* enc/gb18030.c (gb18030_code_to_mbc): add 0x80000000
+	  for 4bytes character.
+
 Mon Jun  2 03:52:04 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* ruby.c (set_arg0): reverted used variable definition.
Index: enc/gb18030.c
===================================================================
--- enc/gb18030.c	(revision 16738)
+++ enc/gb18030.c	(revision 16739)
@@ -185,6 +185,9 @@
 static int
 gb18030_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
 {
+  if ((code & 0xff000000) != 0) {
+	code |= 0x80000000;
+  }
   return onigenc_mb4_code_to_mbc(enc, code, buf);
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]