Questions related to specific aspects of machine-processing Chinese language, or to code that is executed under Chinese localization settings.
Questions tagged [chinese-locale]
398 questions
7
votes
3 answers
Chinese URL loads correctly in Edge but not other browsers
This page was developed in english which works well in Chrome and Edge browsers. Some community members asked then to translate it to Chinese. Same strategy to create the page was taken with the following resulting page.
The problem is that…

Prophet Daniel
- 327
- 2
- 15
7
votes
2 answers
InvalidPathException for chinese filename
I am trying to copy a file on an ubuntu machine using the java statement
Files.copy(new File("/tmp/source/测试.xlsx").toPath(), new File("/tmp/dest/测试.xlsx").toPath(), StandardCopyOption.REPLACE_EXISTING);
But i get the following…

user3820369
- 187
- 2
- 5
7
votes
1 answer
How to use Google's Text-to-Speech service for Chinese characters on Android?
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…

Matter Cat
- 1,538
- 1
- 14
- 23
7
votes
1 answer
How to extract the date fields for locale-specific formatting in Java?
I need to extract only the month and year information from a Java Date to display in a GUI.
This date must be translated using the user locale.
I know 2 ways for formatting localized dates:
Using DateFormat.getInstance(DateFormat.LONG,…

Jidehem
- 1,066
- 11
- 18
6
votes
5 answers
How to display Chinese characters inside a pandas dataframe?
I can read a csv file in which there is a column containing Chinese characters (other columns are English and numbers). However, Chinese characters don't display correctly. see photo below
I loaded the csv file with pd.read_csv().
Either…

Daniel
- 1,428
- 3
- 16
- 35
6
votes
2 answers
How to remove Chinese punctuation in Python
I have the following sentences, that I want to remove all punctuation.
首页 » 政策法规 » 正文吉林省实施《中华人民共和国老年人权益保障法》若干规定 发布时间: 2008-01-04
I want to remove all Chinese punctuation, including empty space " ". Below is my code:
line =…

flyingmouse
- 1,014
- 3
- 13
- 29
6
votes
1 answer
Using boost::locale/ICU boundary analysis with Chinese
Using the sample code from the boost::locale documentation, I can't get the following to correctly tokenize Chinese text:
using namespace boost::locale::boundary;
boost::locale::generator gen;
std::string text="中華人民共和國";
ssegment_index…

Uri Granta
- 1,814
- 14
- 25
6
votes
3 answers
How to read an UTF-8 encoded file containing Chinese characters and output them correctly on console?
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…

Bruce Yang
- 367
- 1
- 5
- 17
5
votes
1 answer
Issue in Jasper iReport generated PDFs in Chrome
I am generating a document in Chinese, as well as several other languages, using conditional formatting in Jasper iReport 5. I have iTextAsian.jar in my lib folder. The generated PDF displays Chinese in IE, Firefox, Adobe, Foxit but not Chrome. …

John
- 134
- 1
- 11
5
votes
2 answers
What is proper way to test if the input is Korean or Chinese using JavaScript?
My application was relying on this function to test if a string is Korean or not :
const isKoreanWord = (input) => {
const match = input.match(/[\u3131-\uD79D]/g);
return match ? match.length === input.length : false;
}
isKoreanWord('만두'); //…

vdegenne
- 12,272
- 14
- 80
- 106
5
votes
1 answer
Chinese collation for MS SQL
I found in our production DB for Asia market weird behavior. Where condition is not working as one would expect in case of Chinese letters.
create table #Temp (TextContent nvarchar(20), ChineseType varchar(10))
insert #Temp values (N'㱔', '??') …

Jaroslav Kubacek
- 1,387
- 18
- 26
5
votes
1 answer
Regular expression with Chinese characters and full/half-width charatcers
I'm doing validation rules for a java project and one of the requirements I got is:
"The ID card address should contain no less than eight (≥8) Chinese characters (exclusive of full-width/half-width symbols)."
I can't get my head around how to…

BratAnon
- 188
- 3
- 11
5
votes
2 answers
knitr compiling document with chinese
I try compiling YiHui's BIG5 example (knitr with chinese content). I used Mac OSX snowleopard, latest RStudio, pdfLatex (same result with XeLatex). This is an excerpt of the raw…

qoheleth
- 2,219
- 3
- 18
- 23
5
votes
2 answers
Different representation of unicode code points in Japanese and chinese
I am trying to display the glyph corresponding to unicode 0x95E8.
This codepoint is basically of CJK block (chinese, Japanese, Korean).
I am struggling to know if the glyph representation of this particular codepoint can be different for Japanese…

Yogesh
- 565
- 3
- 21
5
votes
1 answer
How to get the script from a Locale object on Android?
From what I see the Android Locale class doesn't mention anything about the script, only the language, country and variant.
Whereas the Java SE Locale class mentions language, country, script, variant and extensions, and of course has a method…

Alex Bitek
- 6,529
- 5
- 47
- 77