Messages in this thread | | | Date | Sat, 29 Mar 2008 10:05:01 -0700 | From | "H. Peter Anvin" <> | Subject | Re: UTF-8 and Alt key in the console |
| |
David Newall wrote: > Jan Engelhardt wrote: >> What do you mean by self-terminating? There is no easy >> synchronization like in UTF-8, given you are anywhere inside >> a text stream, how do you know (a) you are already in an >> escape sequence and (b) how to figure out the rebegin of >> normal text. > > It's not very useful being able to tell you are inside a escape sequence > unless you see that sequence from the start. You do need the complete > sequence to make sense of it.
I think what Jan is alluding to is the property of UTF-8 text that you can start in the middle of a string and either skip an incomplete character or find the beginning of it. If you can search backwards, you can find the beginning of an escape sequence, too; the "skip incomplete" functionality is missing, though, but as you say, isn't actually all that useful in real life *for the applications which use these kinds of escape sequences.*
-hpa
| |