diff --git a/PdfSharpCore/Pdf.IO/Lexer.cs b/PdfSharpCore/Pdf.IO/Lexer.cs index 278263bf..c669b1c1 100644 --- a/PdfSharpCore/Pdf.IO/Lexer.cs +++ b/PdfSharpCore/Pdf.IO/Lexer.cs @@ -500,7 +500,8 @@ public Symbol ScanLiteralString() { // Octal character code. if (ch >= '8') - ParserDiagnostics.HandleUnexpectedCharacter(ch); + break; // Since the first possible octal character is not valid, + // the backslash is ignored. int n = ch - '0'; if (char.IsDigit(_nextChar)) // Second octal character. @@ -521,12 +522,6 @@ public Symbol ScanLiteralString() } ch = (char)n; } - else - { - //TODO - // Debug.As sert(false, "Not implemented; unknown escape character."); - ParserDiagnostics.HandleUnexpectedCharacter(ch); - } break; } break;