From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <682b2ffa224b0839764fbd779d874952@quanstro.net> From: erik quanstrom Date: Fri, 28 Jul 2006 13:19:26 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] quote file name In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 92c30444-ead1-11e9-9d60-3106f5b1d025 On Fri Jul 28 13:26:14 CDT 2006, micah@stetsonnet.org wrote: > > in addition, one would need to change the string from > > "`^#*[]=|\\?${}()'<>&;" (char*) > > to > > L"`^#*[]=|\\?${}()'<>&;" (Rune*) > > i was trying to avoid that. i think it would make p9p harder. > > (i dont trust gcc with L"".) > > No, utfrune finds a rune in a UTF-8 string (char *). R is already a > Rune (even though it's declared int), so nothing needs to change, you're right about this. but why obfuscate the situation with Runes? the only characters that rc will treat as special are us-ascii -- that is < 0x80. - erik > except to replace strchr with utfrune. Utfrune starts like this: > > char* > utfrune(char *s, long c) > { > ... > if(c < Runesync) /* not part of utf sequence */ > return strchr(s, c); > ... > > Which is exactly what you were doing (Runesync == 0x80).