Skip to content

Commit

Permalink
Another attempt to fix multi-byte trimming problem
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinboone committed Apr 4, 2017
1 parent 589e5aa commit dda6086
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions epub2txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ void epub2txt_flush_para (const klib_String *para, int width, BOOL notrim)
{
char c = s[i];

/*if (mode == MODE_START && (c == ' '
if (mode == MODE_START && (c == ' '
|| (unsigned char) c == (unsigned char)0xC2))
{
if (i < l - 1)
Expand All @@ -498,7 +498,8 @@ void epub2txt_flush_para (const klib_String *para, int width, BOOL notrim)
}
// Absorb leading spaces
}
*/

/*
if ((mode == MODE_START && (c == ' '
|| (unsigned char) c == (unsigned char)0xC2))
&&
Expand All @@ -509,6 +510,7 @@ void epub2txt_flush_para (const klib_String *para, int width, BOOL notrim)
i++;
}
// Absorb leading spaces
*/
else if (mode == MODE_START)
{
klib_string_append_byte (word, c);
Expand Down

0 comments on commit dda6086

Please sign in to comment.