+ if(numeric_type==16)
+ {
+ unsigned digit=0;
+ if(*i>='0' && *i<='9')
+ digit=*i-'0';
+ else if(*i>='a' && *i<='f')
+ digit=*i-'a'+10;
+ else if(*i>='A' && *i<='F')
+ digit=*i-'A'+10;
+ else
+ throw InvalidParameterValue("Invalid hexadecimal digit");
+
+ numeric_value=(numeric_value<<4 | digit);
+ ++numeric_pos;
+ if(numeric_pos==2)
+ {
+ result+=numeric_value;
+ numeric_type=0;
+ }
+ }
+ else if(numeric_type==8)
+ {
+ unsigned digit=0;
+ if(*i>='0' && *i<='7')
+ digit=*i-'0';
+ else
+ throw InvalidParameterValue("Invalid octal digit");
+
+ numeric_value=(numeric_value<<3 | digit);
+ ++numeric_pos;
+ if(numeric_pos==3)
+ {
+ result+=numeric_value;
+ numeric_type=0;
+ }
+ }
+ else if(escape)
+ {
+ if(*i=='x')
+ {
+ numeric_type=16;
+ numeric_pos=0;
+ numeric_value=0;
+ }
+ else if(*i>='0' && *i<='3')
+ {
+ numeric_type=8;
+ numeric_pos=1;
+ numeric_value=*i-'0';
+ }
+ else if(*i=='n')
+ result+='\n';
+ else if(*i=='t')
+ result+='\t';
+ else if(*i=='r')
+ result+='\r';
+ else if(*i=='b')
+ result+='\b';
+ else if(*i=='v')
+ result+='\v';
+ else if(*i=='a')
+ result+='\a';
+ else if(*i=='f')
+ result+='\f';
+ else if(*i=='\"')
+ result+='\"';
+ else if(*i=='\'')
+ result+='\'';
+ else if(*i=='\\')
+ result+='\\';
+ else
+ throw InvalidParameterValue("Invalid escape sequence");
+
+ escape=false;
+ }
+ else if(*i=='\\')
+ escape=true;
+ else
+ result+=*i;