case 0xFE53 :
case 0xFE67 :
case 0xFE75 :
case 0xFF00 :
case 0xFFE7 :
throw new InvalidCharacterException( c );
default:
break;
}
// RFC 3454, Table A.1, intervals
if ( ( c >= 0x0234 ) && ( c <= 0x024F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x02AE ) && ( c <= 0x02AF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x02EF ) && ( c <= 0x02FF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0350 ) && ( c <= 0x035F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0370 ) && ( c <= 0x0373 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0376 ) && ( c <= 0x0379 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x037B ) && ( c <= 0x037D ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x037F ) && ( c <= 0x0383 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x03F7 ) && ( c <= 0x03FF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x04F6 ) && ( c <= 0x04F7 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x04FA ) && ( c <= 0x04FF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0510 ) && ( c <= 0x0530 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0557 ) && ( c <= 0x0558 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x058B ) && ( c <= 0x0590 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x05C5 ) && ( c <= 0x05CF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x05EB ) && ( c <= 0x05EF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x05F5 ) && ( c <= 0x060B ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x060D ) && ( c <= 0x061A ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x061C ) && ( c <= 0x061E ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x063B ) && ( c <= 0x063F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0656 ) && ( c <= 0x065F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x06EE ) && ( c <= 0x06EF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x072D ) && ( c <= 0x072F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x074B ) && ( c <= 0x077F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x07B2 ) && ( c <= 0x0900 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x093A ) && ( c <= 0x093B ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x094E ) && ( c <= 0x094F ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0955 ) && ( c <= 0x0957 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0971 ) && ( c <= 0x0980 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x098D ) && ( c <= 0x098E ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0991 ) && ( c <= 0x0992 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09B3 ) && ( c <= 0x09B5 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09BA ) && ( c <= 0x09BB ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09C5 ) && ( c <= 0x09C6 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09C9 ) && ( c <= 0x09CA ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09CE ) && ( c <= 0x09D6 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09D8 ) && ( c <= 0x09DB ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09E4 ) && ( c <= 0x09E5 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x09FB ) && ( c <= 0x0A01 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A03 ) && ( c <= 0x0A04 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A0B ) && ( c <= 0x0A0E ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A11 ) && ( c <= 0x0A12 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A3A ) && ( c <= 0x0A3B ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A43 ) && ( c <= 0x0A46 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A49 ) && ( c <= 0x0A4A ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A4E ) && ( c <= 0x0A58 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A5F ) && ( c <= 0x0A65 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0A75 ) && ( c <= 0x0A80 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0ABA ) && ( c <= 0x0ABB ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0ACE ) && ( c <= 0x0ACF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0AD1 ) && ( c <= 0x0ADF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0AE1 ) && ( c <= 0x0AE5 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0AF0 ) && ( c <= 0x0B00 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B0D ) && ( c <= 0x0B0E ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B11 ) && ( c <= 0x0B12 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B34 ) && ( c <= 0x0B35 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B3A ) && ( c <= 0x0B3B ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B44 ) && ( c <= 0x0B46 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B49 ) && ( c <= 0x0B4A ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B4E ) && ( c <= 0x0B55 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B58 ) && ( c <= 0x0B5B ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B62 ) && ( c <= 0x0B65 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B71 ) && ( c <= 0x0B81 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B8B ) && ( c <= 0x0B8D ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0B96 ) && ( c <= 0x0B98 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BA0 ) && ( c <= 0x0BA2 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BA5 ) && ( c <= 0x0BA7 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BAB ) && ( c <= 0x0BAD ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BBA ) && ( c <= 0x0BBD ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BC3 ) && ( c <= 0x0BC5 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BCE ) && ( c <= 0x0BD6 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BD8 ) && ( c <= 0x0BE6 ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c >= 0x0BF3 ) && ( c <= 0x0C00 ) )
{
throw new InvalidCharacterException( c );
}
// RFC 3454, Table C.3
if ( ( c >= 0xE000 ) && ( c <= 0xF8FF ) )
{
throw new InvalidCharacterException( c );
}
// RFC 3454, Table C.4
if ( ( c >= 0xFDD0 ) && ( c <= 0xFDEF ) )
{
throw new InvalidCharacterException( c );
}
if ( ( c == 0xFFFE ) || ( c == 0xFFFF ) )
{
throw new InvalidCharacterException( c );
}
// RFC 3454, Table C.5 (Surrogates)
if ( ( c >= 0xD800 ) && ( c <= 0xDFFF ) )
{
throw new InvalidCharacterException( c );
}
// RFC 3454, Table C.8
switch ( c)
{
case 0x0340 : // COMBINING GRAVE TONE MARK
case 0x0341 : // COMBINING ACUTE TONE MARK
case 0x200E : // LEFT-TO-RIGHT MARK
case 0x200F : // RIGHT-TO-LEFT MARK
case 0x202A : // LEFT-TO-RIGHT EMBEDDING
case 0x202B : // RIGHT-TO-LEFT EMBEDDING
case 0x202C : // POP DIRECTIONAL FORMATTING
case 0x202D : // LEFT-TO-RIGHT OVERRIDE
case 0x202E : // RIGHT-TO-LEFT OVERRIDE
case 0x206A : // INHIBIT SYMMETRIC SWAPPING
case 0x206B : // ACTIVATE SYMMETRIC SWAPPING
case 0x206C : // INHIBIT ARABIC FORM SHAPING
case 0x206D : // ACTIVATE ARABIC FORM SHAPING
case 0x206E : // NATIONAL DIGIT SHAPES
case 0x206F : // NOMINAL DIGIT SHAPES
throw new InvalidCharacterException( c );
default :
break;
}
if ( c == 0xFFFD )
{
throw new InvalidCharacterException( c );
}
}