diff --git a/Easydict/Feature/Service/Baidu/EZBaiduTranslate.m b/Easydict/Feature/Service/Baidu/EZBaiduTranslate.m index 6fdeef8bb..5b6137076 100644 --- a/Easydict/Feature/Service/Baidu/EZBaiduTranslate.m +++ b/Easydict/Feature/Service/Baidu/EZBaiduTranslate.m @@ -324,7 +324,7 @@ - (NSString *)getAudioURLWithText:(NSString *)text langCode:(NSString *)ttsLangC */ text = [text trimToMaxLength:1000]; - text = [text mm_urlencode]; // text.mm_urlencode + text = [text encode]; // text.mm_urlencode // Refer to Baidu web. NSInteger speed = [ttsLangCode isEqualToString:@"zh"] ? 5 : 3; @@ -343,7 +343,7 @@ - (NSString *)getAudioURLWithText:(NSString *)text langCode:(NSString *)ttsLangC // */ // // text = [text trimToMaxLength:1000]; -// text = [text mm_urlencode]; // text.mm_urlencode +// text = [text encode]; // text.mm_urlencode // // NSString *ttsLangCode = [self getTTSLanguageCode:language]; // diff --git a/Easydict/Feature/Service/Google/EZGoogleTranslate.m b/Easydict/Feature/Service/Google/EZGoogleTranslate.m index 8aadd6342..5c65d0e22 100644 --- a/Easydict/Feature/Service/Google/EZGoogleTranslate.m +++ b/Easydict/Feature/Service/Google/EZGoogleTranslate.m @@ -265,7 +265,7 @@ - (NSString *)getAudioURLWithText:(NSString *)text NSString *audioURL = [NSString stringWithFormat:@"%@/" @"translate_tts?ie=UTF-8&q=%@&tl=%@&total=1&idx=0&" @"textlen=%zd&tk=%@&client=webapp&prev=input", - kGoogleTranslateURL, text.mm_urlencode, language, + kGoogleTranslateURL, text.encode, language, text.length, sign]; return audioURL; } diff --git a/Easydict/Feature/Service/Youdao/EZYoudaoTranslate.m b/Easydict/Feature/Service/Youdao/EZYoudaoTranslate.m index f94c5a456..fcb9b9a8f 100644 --- a/Easydict/Feature/Service/Youdao/EZYoudaoTranslate.m +++ b/Easydict/Feature/Service/Youdao/EZYoudaoTranslate.m @@ -326,7 +326,7 @@ - (void)textToAudio:(NSString *)text fromLanguage:(EZLanguage)from completion:(v NSString *language = [self getTTSLanguageCode:from]; // text = [text trimToMaxLength:1000]; - text = [text mm_urlencode]; // text.mm_urlencode + text = [text encode]; // text.mm_urlencode NSString *audioURL = [NSString stringWithFormat:@"%@/dictvoice?audio=%@&le=%@", kYoudaoDictURL, text, language]; // audioURL = [NSString stringWithFormat:@"https://fanyi.sogou.com/reventondc/synthesis?text=%@&speed=1&lang=%@&from=translateweb&speaker=6", text, language];