mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 06:01:53 +00:00
[1.41.09]
Ignore characters U+200c, U+200d (zero width non-joiner, zero width joiner). git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@224 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -70,6 +70,12 @@ static const char *punct_close = ")]}>;'\""; // always pitch fall unless follow
|
||||
static const char *tone_punct_on = "\0016T"; // add reverberation, lower pitch
|
||||
static const char *tone_punct_off = "\001T";
|
||||
|
||||
// ignore these characters
|
||||
static const unsigned short chars_ignore[] = {
|
||||
0x200c, // zero width non-joiner
|
||||
0x200d, // zero width joiner
|
||||
0 };
|
||||
|
||||
// punctuations symbols that can end a clause
|
||||
static const unsigned short punct_chars[] = {',','.','?','!',':',';',
|
||||
0x2013, // en-dash
|
||||
@@ -2190,6 +2196,12 @@ f_input = f_in; // for GetC etc
|
||||
c2 = ' ';
|
||||
}
|
||||
|
||||
if(lookupwchar(chars_ignore,c1))
|
||||
{
|
||||
// ignore this character (eg. zero-width-non-joiner U+200C)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(iswspace(c1))
|
||||
{
|
||||
char *p_word;
|
||||
|
||||
Reference in New Issue
Block a user