9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] a strange bug in grep
@ 2014-03-29 23:31 arisawa
  2014-03-29 23:54 ` erik quanstrom
  0 siblings, 1 reply; 10+ messages in thread
From: arisawa @ 2014-03-29 23:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

I found a strange bug in grep.
some Japanese runes does not match ‘[^0-9]’.

for example ‘ま' (307e) and ‘み’(307f).

unicode table from 3040 to 3090 is 
3040 ぀	3041 ぁ	3042 あ	3043 ぃ	3044 い	3045 ぅ	3046 う	3047 ぇ
3048 え	3049 ぉ	304a お	304b か	304c が	304d き	304e ぎ	304f く
3050 ぐ	3051 け	3052 げ	3053 こ	3054 ご	3055 さ	3056 ざ	3057 し
3058 じ	3059 す	305a ず	305b せ	305c ぜ	305d そ	305e ぞ	305f た
3060 だ	3061 ち	3062 ぢ	3063 っ	3064 つ	3065 づ	3066 て	3067 で
3068 と	3069 ど	306a な	306b に	306c ぬ	306d ね	306e の	306f は
3070 ば	3071 ぱ	3072 ひ	3073 び	3074 ぴ	3075 ふ	3076 ぶ	3077 ぷ
3078 へ	3079 べ	307a ぺ	307b ほ	307c ぼ	307d ぽ	307e ま	307f み
3080 む	3081 め	3082 も	3083 ゃ	3084 や	3085 ゅ	3086 ゆ	3087 ょ
3088 よ	3089 ら	308a り	308b る	308c れ	308d ろ	308e ゎ	308f わ
3090 ゐ

I tried some of them.
term% cat t3
あ
は
ば
ぱ
ひ
び
ぴ
ふ
ぶ
ぷ
へ
べ
ぺ
ほ
ぼ
ぽ
ま
み
む
め
も
term% grep -v '[^0-9]' t3
ま
み
term% 

Kenji Arisawa





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-30 18:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-29 23:31 [9fans] a strange bug in grep arisawa
2014-03-29 23:54 ` erik quanstrom
2014-03-30  0:51   ` arisawa
2014-03-30  1:44   ` cinap_lenrek
2014-03-30  6:10     ` erik quanstrom
2014-03-30 15:40       ` cinap_lenrek
2014-03-30 16:26         ` erik quanstrom
2014-03-30 18:05           ` cinap_lenrek
2014-03-30 18:10             ` erik quanstrom
2014-03-30  6:24     ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).