From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 28 Jul 2006 10:52:30 -0700 From: "Micah Stetson" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] quote file name In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Topicbox-Message-UUID: 92baa934-ead1-11e9-9d60-3106f5b1d025 > 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, 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). Micah