diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2010-11-07 16:25:12 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2010-11-07 16:25:12 +0000 |
commit | 2f9b835c16d58d3b5aaa05b177d884335dddaee1 (patch) | |
tree | 5ecd8a64cda8d314b05fea403936e8bf6ef1fbbd | |
parent | 48f3c76588362811dfc43674ba54066f2f31b045 (diff) | |
download | pcre-2f9b835c16d58d3b5aaa05b177d884335dddaee1.tar.gz |
Clarify pcretest documentation of \xhh vs \x{hh}.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@570 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | doc/pcretest.1 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/pcretest.1 b/doc/pcretest.1 index 42fc4fd..b11ec66 100644 --- a/doc/pcretest.1 +++ b/doc/pcretest.1 @@ -344,7 +344,8 @@ recognized: \et tab (\ex09) \ev vertical tab (\ex0b) \ennn octal character (up to 3 octal digits) - \exhh hexadecimal character (up to 2 hex digits) + always a byte unless > 255 in UTF-8 mode + \exhh hexadecimal byte (up to 2 hex digits) .\" JOIN \ex{hh...} hexadecimal character, any number of digits in UTF-8 mode @@ -434,6 +435,13 @@ recognized: \e<any> pass the PCRE_NEWLINE_ANY option to \fBpcre_exec()\fP or \fBpcre_dfa_exec()\fP .sp +Note that \exhh always specifies one byte, even in UTF-8 mode; this makes it +possible to construct invalid UTF-8 sequences for testing purposes. On the +other hand, \ex{hh} is interpreted as a UTF-8 character in UTF-8 mode, +generating more than one byte if the value is greater than 127. When not in +UTF-8 mode, it generates one byte for values less than 256, and causes an error +for greater values. +.P The escapes that specify line ending sequences are literal strings, exactly as shown. No more than one newline setting should be present in any data line. .P @@ -770,6 +778,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 06 November 2010 +Last updated: 07 November 2010 Copyright (c) 1997-2010 University of Cambridge. .fi |