chinese-locale

How to use Google's Text-to-Speech service for Chinese characters on Android?

不打扰是莪最后的温柔 提交于 2019-12-22 05:01:19
问题 I'm trying to pull an audio file from google's text-to-speech function. Basically, you toss in the link and then concat whatever you want to be spoken at the end of it. I've gotten the below code to work just fine for English, so I think the problem must be how the Chinese characters are getting encoded in the request. Here's what I've got: 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

IText - Generating PDF with Chinese characters (Chinese Simplified)

痞子三分冷 提交于 2019-12-20 07:23:58
问题 I am using iText to generate some PDFs, these pdfs have some Chinese characters (Simplified Chinese - GB2312), however I am unable to generate a pdf with these characters. Anyone could tell me where I am wrong? I tried using various forms of creation but did not succeed: BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); com.itextpdf.text.DocumentException: Font 'STSong-Light' with 'UniGB-UCS2-H' is not recognized. at com.itextpdf.text.pdf.BaseFont

Swift cannot read madarin from JSON api?

ε祈祈猫儿з 提交于 2019-12-20 07:19:29
问题 I'm trying to read from the API's i've created using Kimono. However, when i print it in my console it seems like it can't read Mandarin Chinese in my xcode? Am I missing something here? Here's my code: let myContentsToBeScanned = NSURL(string: "https://www.kimonolabs.com/api/7ant5tkm?apikey=jlZUlWROWVJjPFrVbCwdmmcIaTWO6ISI") let myDataToBeRead = NSData(contentsOfURL: myContentsToBeScanned!) do { let myContentsFromJSON = try NSJSONSerialization.JSONObjectWithData(myDataToBeRead!, options: [])

How to use mPDF for Chinese Language

杀马特。学长 韩版系。学妹 提交于 2019-12-19 08:27:25
问题 I am using mPDF to save form input data to PDF. For English, it is working fine. Anyone can use this code to save HTML Form data to PDF. Issue: In order to fulfill my project requirement I need to use the Chinese Language. My current code is not working for that. Form.html <form action='processPDF.php' method='post'> <label for="name">Name</label> <input name="name" type="text" id="name"> <input type='submit' name='submit' value='Download PDF'> </form> processPDF.php <?php header('Content

ReportLab: working with Chinese/Unicode characters

淺唱寂寞╮ 提交于 2019-12-18 14:12:45
问题 TL;DR: Is there some way of telling ReportLab to use a specific font, and fallback to another if glyphs for some characters are missing? Alternatively, Do you know of a condensed TrueType font which contains the glyphs for all European languages, Hebrew, Russian, Chinese, Japanese and Arabic? I've been creating reports with ReportLab, and have encountered problems with rendering strings containing Chinese characters. The font I've been using is DejaVu Sans Condensed, which does not contain

ReportLab: working with Chinese/Unicode characters

馋奶兔 提交于 2019-12-18 14:12:42
问题 TL;DR: Is there some way of telling ReportLab to use a specific font, and fallback to another if glyphs for some characters are missing? Alternatively, Do you know of a condensed TrueType font which contains the glyphs for all European languages, Hebrew, Russian, Chinese, Japanese and Arabic? I've been creating reports with ReportLab, and have encountered problems with rendering strings containing Chinese characters. The font I've been using is DejaVu Sans Condensed, which does not contain

How to read an UTF-8 encoded file containing Chinese characters and output them correctly on console?

安稳与你 提交于 2019-12-17 19:53:16
问题 I am writing a web crawler to fetch some Chinese web files. The fetched files are encoded in utf-8. And I need to read those file to do some parse, such as extracting the URLs and Chinese Characters. But I found that when I read the file into a std::string variable and output it into the console, the Chinese characters became garbage characters. I applied the boost::regex into the std::string variable and can extract all URLs but Chinese characters. How can I solves those problems? P.S. My

.NET Chinese CultureInfo “zh” does not exist?

懵懂的女人 提交于 2019-12-13 19:09:53
问题 I'm using .NET 3.5 and running the following code: var culture = new CultureInfo("zh"); // Throws ArgumentException I got the string "zh" from an xml:lang attribute. I don't understand why an exception is thrown, because for instance "de" (wich is parent for "de-DE") is working fine. The culture "zh-CN" does work, but thats nothing that I can use. Edit: It works on .NET 4.5.1 (thanks to xanatos) - so even if the MSDN page explains that Chinese is an exception, the behaviour is different in

Using sed, how can a regular expression match Chinese characters?

我与影子孤独终老i 提交于 2019-12-12 07:16:07
问题 I decided to post a question, after spending quite some time and still not figuring out the problem. Also read a bunch of seemingly related posts, none really fit my simple (?) problem. So I have a possibly large text file (>1000 lines) that contains Mandarin Chinese chars, with a sample line like: "ref#2-5-1.jpg#2#一些 <variable> 内容#pic##" (the Chinese just means "some content"). All that needs to be modified is that a space should be inserted between each character, if there is not one

Input Chinese characters not correctly echoed in ESS

早过忘川 提交于 2019-12-11 13:53:40
问题 I had this weird encoding issue for my Emacs and R environment. Display of Chinese characters are all good with my .Rprofile setting Sys.setlocale("LC_ALL","zh_CN.utf-8"); except the echo of input ones. > linkTexts[5] font "使用帮助" > functionNotExist() 错误: 没有"functionNotExist"这个函数 > fire <- "你好" > fire [1] " " As we can see, Chinese characters contained in the vector linkTexts , Chinese error messages, and input Chinese characters all can be perfectly shown, yet the echo of input characters