# HG changeset patch # User Kenichi Handa # Date 1020900747 0 # Node ID ddb17e4c813cd11ec45ce3c22c8732b6959192f0 # Parent ae455bb40718d2ba6a9dc1b638db89f654bfaf4c (END): Initialize lastgb and gbtable[lastgb] correctly. diff -r ae455bb40718 -r ddb17e4c813c etc/charsets/gb18030.awk --- a/etc/charsets/gb18030.awk Wed May 08 04:19:41 2002 +0000 +++ b/etc/charsets/gb18030.awk Wed May 08 23:32:27 2002 +0000 @@ -69,8 +69,10 @@ END { lastgb = 0; - surrogate_min = decode_hex("D800") - surrogate_max = decode_hex("DFFF") + surrogate_min = decode_hex("D800"); + surrogate_max = decode_hex("DFFF"); + lastgb = unitable[128]; + gbtable[lastgb] = 128; for (i = 129; i < 65536; i++) { if (unitable[i] == 0 && (i < surrogate_min || i > surrogate_max)) @@ -86,7 +88,6 @@ } } - print "You blew it again!" > "/dev/stderr" fromgb = lastgb = unitable[128]; for (i = 129; i < 65536; i++) {