Fixed problem with languages: ru, el, zhy, not speaking English words. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@163 d46cf337-b52f-0410-862d-fd96e6ae7743master
| int Translator::IsLetter(int letter, int group) | int Translator::IsLetter(int letter, int group) | ||||
| {//============================================ | {//============================================ | ||||
| int letter2; | |||||
| if(letter_groups[group] != NULL) | if(letter_groups[group] != NULL) | ||||
| { | { | ||||
| if(wcschr(letter_groups[group],letter)) | if(wcschr(letter_groups[group],letter)) | ||||
| if(group > 7) | if(group > 7) | ||||
| return(0); | return(0); | ||||
| if(letter_bits_offset > 0) | if(letter_bits_offset > 0) | ||||
| { | { | ||||
| letter -= letter_bits_offset; | |||||
| if(((letter2 = (letter - letter_bits_offset)) > 0) && (letter2 < 0x80)) | |||||
| letter = letter2; | |||||
| else | |||||
| return(0); | |||||
| } | } | ||||
| else | else | ||||
| { | { |
| ph_buf1[0] = 0; | ph_buf1[0] = 0; | ||||
| return; | return; | ||||
| } | } | ||||
| if(ph_buf3[0] == phonSWITCH) | |||||
| { | |||||
| strcpy(ph_buf1,ph_buf3); | |||||
| return; | |||||
| } | |||||
| // at a stress marker at the start of the letter name, unless one is already marked | // at a stress marker at the start of the letter name, unless one is already marked | ||||
| ph_stress[0] = phonSTRESS_P; | ph_stress[0] = phonSTRESS_P; | ||||
| ph_stress[1] = 0; | ph_stress[1] = 0; |
| #include "translate.h" | #include "translate.h" | ||||
| #include "wave.h" | #include "wave.h" | ||||
| const char *version_string = "1.34 07.Mar.08"; | |||||
| const char *version_string = "1.35 07.Mar.08"; | |||||
| const int version_phdata = 0x013400; | const int version_phdata = 0x013400; | ||||
| int option_device_number = -1; | int option_device_number = -1; |
| { | { | ||||
| // change to another language in order to translate this word | // change to another language in order to translate this word | ||||
| strcpy(word_phonemes,phonemes); | strcpy(word_phonemes,phonemes); | ||||
| return(FLAG_SPELLWORD); | |||||
| return(0); | |||||
| } | } | ||||
| p = &wordx[word_length-3]; // this looks wrong. Doesn't consider multi-byte chars. | p = &wordx[word_length-3]; // this looks wrong. Doesn't consider multi-byte chars. |