[9fans] hard-coded UTF-8 in wc.c

2010-12-28 Thread erik quanstrom
this just popped up when i was searching the archive. On Mon 15 Mar 2010 18:44:41 EST 2010, quans...@quanstro.net wrote: > On Mon Mar 15 17:46:11 EDT 2010, aim0s...@lav... wrote: > > Yes, but why wc utility counts runes (wc(1) call them runes) manually > > using huge table instead of using functio

Re: [9fans] hard-coded UTF-8 in wc.c

2010-03-15 Thread erik quanstrom
On Mon Mar 15 17:46:11 EDT 2010, aim0s...@lavabit.com wrote: > On Mon, Mar 15, 2010 at 05:13:40PM -0400, erik quanstrom wrote: > > perhaps you have misunderstood. > > > > inside programs, sometimes unicode text is represented as > > runes. runes are not sent over pipes nor stored in files. > > >

Re: [9fans] hard-coded UTF-8 in wc.c

2010-03-15 Thread anonymous
On Mon, Mar 15, 2010 at 05:13:40PM -0400, erik quanstrom wrote: > perhaps you have misunderstood. > > inside programs, sometimes unicode text is represented as > runes. runes are not sent over pipes nor stored in files. > > therefore, there is no need to wc runes. Yes, but why wc utility counts

Re: [9fans] hard-coded UTF-8 in wc.c

2010-03-15 Thread erik quanstrom
On Mon Mar 15 17:12:06 EDT 2010, aim0s...@lavabit.com wrote: > Just looked at source of wc > (http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/wc.c). UTF-8 > is hard-coded here. What is the reason? Nobody wants to rewrite it, > it is optimization or it is impossible to rewrite it using runes fo

[9fans] hard-coded UTF-8 in wc.c

2010-03-15 Thread anonymous
Just looked at source of wc (http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/wc.c). UTF-8 is hard-coded here. What is the reason? Nobody wants to rewrite it, it is optimization or it is impossible to rewrite it using runes for some reason? http://plan9.bell-labs.com/sys/doc/utf.html says all