diff --git a/src/dictionary.cpp b/src/dictionary.cpp index 9e8fe475..a6aecb7a 100755 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -703,6 +703,8 @@ int Translator::IsLetterGroup(char *word, int group, int pre) int Translator::IsLetter(int letter, int group) {//============================================ + int letter2; + if(letter_groups[group] != NULL) { if(wcschr(letter_groups[group],letter)) @@ -713,10 +715,12 @@ int Translator::IsLetter(int letter, int group) if(group > 7) return(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 { diff --git a/src/numbers.cpp b/src/numbers.cpp index e53533bc..26233eb7 100644 --- a/src/numbers.cpp +++ b/src/numbers.cpp @@ -562,7 +562,11 @@ void Translator::LookupLetter(unsigned int letter, int next_byte, char *ph_buf1) ph_buf1[0] = 0; 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 ph_stress[0] = phonSTRESS_P; ph_stress[1] = 0; diff --git a/src/synthdata.cpp b/src/synthdata.cpp index d48b2659..5fcb5710 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,7 +35,7 @@ #include "translate.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; int option_device_number = -1; diff --git a/src/translate.cpp b/src/translate.cpp index 9c367d56..0c47cb82 100755 --- a/src/translate.cpp +++ b/src/translate.cpp @@ -787,7 +787,7 @@ if((wmark > 0) && (wmark < 8)) { // change to another language in order to translate this word strcpy(word_phonemes,phonemes); - return(FLAG_SPELLWORD); + return(0); } p = &wordx[word_length-3]; // this looks wrong. Doesn't consider multi-byte chars.