Tag: chinese locale

如何在Android上使用Google的中文字符文字转语音服务?

我正试图从谷歌的文字转语音function中提取音频文件。 基本上,你抛出链接,然后在结束时连接任何你想说的话。 我已经得到了下面的代码,可以很好地用于英语,所以我认为问题必须是如何在请求中对汉字进行编码。 这是我得到的: String text = “text to be spoken”; public static final String AUDIO_CHINESE= “http://www.translate.google.com/translate_tts?tl=zh&q=”; public static final String AUDIO_ENGLISH = “http://www.translate.google.com/translate_tts?tl=en&q=”; URL url = new URL(AUDIO_ENGLISH + text); urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod(“GET”); urlConnection.setRequestProperty(“Accept-Charset”, Variables.UTF_8); if (urlConnection.getResponseCode() ==200) { //get byte array in response in = new DataInputStream(urlConnection.getInputStream()); } else { in […]

Apache FOP使用SunSim显示###

我正在维护一个使用Apache FOP打印PDF文档的程序。 有几个关于中文字符出现“####”的投诉。 我找到了一个关于这个问题的现有线程,并在我身边做了一些研究。 http://apache-fop.1065347.n5.nabble.com/Chinese-Fonts-td10789.html 我的系统上安装了uming.tff语言文件。 与此post中的人不同,我仍然得到“####”。 从现在开始,有没有人看过一个可以让你使用Apache FOP在PDF文档中打印复杂字符的工作? 瑞安