Skip to content

Commit

Permalink
fix bug in UTF-16BE conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Aug 10, 2015
1 parent 545a063 commit 0337d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/pdfrenderer.cpp
Expand Up @@ -419,7 +419,7 @@ char* TessPDFRenderer::GetPDFTextObjects(TessBaseAPI* api,
for (int i = 0; i < unicodes.length(); i++) {
int code = unicodes[i];
// Convert to UTF-16BE https://en.wikipedia.org/wiki/UTF-16
if ((code > 0xD7FF && code < 0xE0000) || code > 0x10FFFF) {
if ((code > 0xD7FF && code < 0xE000) || code > 0x10FFFF) {
tprintf("Dropping invalid codepoint %d\n", code);
continue;
}
Expand Down

0 comments on commit 0337d89

Please sign in to comment.