1 Sep 2006 02:03
Re: Minor new fish feature
On 8/31/06, Martin Bähr <mbaehr@...> wrote: > On Thu, Aug 31, 2006 at 06:20:32PM +0200, Axel Liljencrantz wrote: > > It is sometimes easier to rememer the name of a control sequence than > > it's value. > > absolutely, this definetly goes a long way towards not missing verbatim > input with ctrl-v. thank you. > > > * Numbered sequences, like \4, \x3f and \u2026 > > * Numbered byte seqences, like \Xfe (These differ from the above in > > that they can be used to create bytes which do not exist in the > > current character set, e.g. values above 127 in an ASCII locale) > > this has me confused now, \x3f dies not go above 127? > what is \xff and how does it differ from \Xff? \xXX is an ASCII character yes. If you want to go higher, use \uXX, it allows you to use up to 16 bits. The C standard says this about \xXX characters: The value of an octal or hexadecimal escape sequence shall be in the range of representable values for the type unsigned char for an integer character constant, or the unsigned type corresponding to wchar_t for a wide character constant. So it should actually be ok to extend this up to 256. The problem is that ISO C does not specify the character encoding, so this is rarely portable. I chose Ascii as the encoding for \xXX sequences. It would be easy to chose Unicode as the encoding and extend this to make \xXX allow any single-byte unicode sequence.(Continue reading)
RSS Feed