Skip to content

Commit

Permalink
APREPRO: Make utf-8 detection a warning instead of error
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Oct 16, 2023
1 parent 2156b0a commit c7094dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions packages/seacas/libraries/aprepro_lib/apr_scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3300,8 +3300,7 @@ namespace SEAMS {
}

if (!string_is_ascii(line, strlen(line))) {
yyerror("input line contains non-ASCII (probably UTF-8) characters which will most likely "
"be parsed incorrectly.");
aprepro.warning("input line contains non-ASCII (probably UTF-8) characters which might be parsed incorrectly.");
}

SEAMS::gl_histadd(line);
Expand All @@ -3324,9 +3323,8 @@ namespace SEAMS {
}
else {
if (!string_is_ascii(buf, yyin->gcount())) {
yyerror(
"input file contains non-ASCII (probably UTF-8) characters which will most likely "
"be parsed incorrectly.");
aprepro.warning(
"input file contains non-ASCII (probably UTF-8) characters which might be parsed incorrectly.");
}
return yyin->gcount();
}
Expand Down
6 changes: 2 additions & 4 deletions packages/seacas/libraries/aprepro_lib/aprepro.ll
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,7 @@ integer {D}+({E})?
}

if (!string_is_ascii(line, strlen(line))) {
yyerror("input line contains non-ASCII (probably UTF-8) characters which will most likely "
"be parsed incorrectly.");
aprepro.warning("input line contains non-ASCII (probably UTF-8) characters which might be parsed incorrectly.");
}

SEAMS::gl_histadd(line);
Expand All @@ -877,8 +876,7 @@ integer {D}+({E})?
}
else {
if (!string_is_ascii(buf, yyin->gcount())) {
yyerror("input file contains non-ASCII (probably UTF-8) characters which will most likely "
"be parsed incorrectly.");
aprepro.warning("input file contains non-ASCII (probably UTF-8) characters which will might be parsed incorrectly.");
}
return yyin->gcount();
}
Expand Down

0 comments on commit c7094dd

Please sign in to comment.