From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6fd911a6d72575a69474c6f60f747907@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] UTF-8 criticism? Date: Mon, 19 Jul 2004 22:35:25 +0100 From: rog@vitanuova.com In-Reply-To: <6e35c06204071810312daa31a9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: c32c52a6-eacd-11e9-9e20-41e7f4b1d025 you do have to be a bit careful with utf-8, as many possible byte sequences map down to the same rune (error), so if you do your comparisons too early, you run the risk of inconsistency. for instance, you can exploit this (at least, i *think* this is the cause) to create a file that can never be removed on ken's fileserver: #include #include void main(void) { char f[] = {0xc0, 0xb0, 0}; create(f, OWRITE, 0666) } don't try this at home...