freebsd-ports/chinese/libchewing/files/patch-src-char.c
Cheng-Lung Sung d5a4216cea - since isspace(0xa0) return true. When using sscanf(...,"%s",...),
it will treat some UTF8 words containing 0xa0 as spaces.
  Thus those words will be skipped.
- added two patch to avoid that problem.
- bump PORTREVISION

Submitted by:	Rong-En Fan <rafan_AT_infor dot org>
2006-05-20 16:23:34 +00:00

11 lines
345 B
C

--- src/char.c.orig Mon May 15 14:49:43 2006
+++ src/char.c Sun May 21 00:14:41 2006
@@ -126,7 +126,7 @@
fgettab( buf, 1000, dictfile );
/* only read 6 bytes to wrd_ptr->word avoid buffer overflow */
- sscanf( buf, "%hu %6s", &sh, wrd_ptr->word );
+ sscanf( buf, "%hu %6[^ ]", &sh, wrd_ptr->word );
assert( wrd_ptr->word != NULL );
}