- Home /
Question by
staffantan · Feb 08, 2013 at 03:49 PM ·
wwwttsforeign-language
WWW with special characters (japanese)
I'm trying to do something like:
AudioClip nameClip;
void Start(){
string japaneseName = "ヨッシー";
WWW www = new WWW("http://translate.google.com/translate_tts?tl=ja&q="+WWW.EscapeURL(japaneseName)); //should return MP3-file
nameClip = www .GetAudioClip(true, true, AudioType.MPEG);
}
void Update () {
if(!audio.isPlaying && nameClip != null && nameClip.isReadyToPlay){
audio.PlayOneShot(nameClip);
nameClip = null;
}
}
which doesn't work, but if I exchange "ヨッシー" with "hello world" it does. Also, if I do a Debug.Log("http://translate.google.com/translate_tts?tl=ja&q="+WWW.EscapeURL(japaneseName)); and put the output in a browser it works as well, but not in Unity.
What's wrong?
Comment
Your answer
Follow this Question
Related Questions
CrossDomain AllowAccessFrom * do not work 1 Answer
Write and read data to php with AddBinaryData 0 Answers
Pause a download 1 Answer
Is HTTPS supported on Windows Store through WWW? 0 Answers
Issue with WWW-Class' slow response time 2 Answers