Skip to content

Commit

Permalink
Detect ISO-8859-1 bytes as well
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Apr 6, 2024
1 parent 0035f14 commit a353a36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions targets/C.source/fn.getinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ UNICC_STATIC UNICC_CHAR _get_char( _pcb* pcb )
{
unsigned char first = UNICC_GETCHAR( pcb );

if ((first & 0x80) == 0)
if ((first & 0x80) == 0 || first >= 0x80)
{
// Single-byte ASCII character
// Single-byte ASCII character (probably ISO-8859-1)
return first;
}
else if ((first & 0xE0) == 0xC0)
Expand Down
4 changes: 2 additions & 2 deletions targets/c.tlt
Original file line number Diff line number Diff line change
Expand Up @@ -1028,9 +1028,9 @@ UNICC_STATIC UNICC_CHAR _get_char( _pcb* pcb )
{
unsigned char first = UNICC_GETCHAR( pcb );

if ((first & 0x80) == 0)
if ((first & 0x80) == 0 || first >= 0x80)
{
// Single-byte ASCII character
// Single-byte ASCII character (probably ISO-8859-1)
return first;
}
else if ((first & 0xE0) == 0xC0)
Expand Down

0 comments on commit a353a36

Please sign in to comment.