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
3
votes
3 answers
Chinese characters showing as blank boxes in strings.xml
I am trying to cut and paste traditional Chinese characters as alternative resources in my values-zh-rTW/strings.xml file. They show as blank white boxes. As far as I can find, every encoding option is set to UTF-8. If it is a font issue, I'm not…

Cohen
- 91
- 2
- 3
3
votes
2 answers
Alphabetical order in Chinese - java.text.Collator
I've been testing alphabetical sorting in Chinese (if I may call it so). This is how Excel sorts some example words:
啊<波<词<的<俄<佛<歌<和<及<课<了<馍<呢<票<气<日<四<特<瓦<喜<以<只
0<2<85

MaDa
- 10,511
- 9
- 46
- 84
2
votes
1 answer
How to store the Chinese strings correctly?
In Visual Studio 2022, using [tag:C++ 17]. I am trying to use a std::map to store Chinese strings:
std::map translation;
translation["Type"] = "类型";
After inserting the values, the string inside translation is question…

keen
- 83
- 7
2
votes
1 answer
Chinese characters with multiple unicode representations
Some Chinese characters have multiple Unicode representations. For example, although the characters 金 and 金 are usually rendered the same, they actually have different underlying unicodes (see https://www.compart.com/en/unicode/U+91D1 and…

Tim Mak
- 297
- 4
- 10
2
votes
1 answer
How to Check If The Rune is Chinese Punctuation Character in Go
For Chinese punctuation chars like ~ , 。, how to detect via Go?
I tried with range table of package unicode like the code below, but Han doesn't include those punctuation chars.
Can you please tell me which range table should I use for this task?…

Yunguan Ting
- 23
- 5
2
votes
1 answer
Why does Session.getActiveUserLocale() return an empty string when Google language is set to Chinese?
I'm using Session.getActiveUserLocale() to get the user's locale in a Google Calendar Workspace add-on (runtimeVersion: V8) and it works perfectly for every language I've tested - except for Chinese (both simplified and traditional).
function…

jazzwhistle
- 337
- 2
- 12
2
votes
1 answer
Formatting percent number to zh (simplified Chinese) using the right percent sign (ie. %)
I'd like to use NumberFormatter to generate zh-localised percents as follows, in order to supersede my own code as follow:
let locale = Locale(identifier: lang)
let formatter = NumberFormatter()
formatter.locale = locale
…

Stéphane de Luca
- 12,745
- 9
- 57
- 95
2
votes
0 answers
Chinese typing in wpf textbox setting text even before OnPreviewKeyDown event
I am working on wpf legacy code and found strange issue. We are using custom control TimePicker inherits from Textbox. We used dependency property to validate time and mask with default value like _ : _. It is working fine with English digits/fonts,…

Subodh
- 75
- 1
- 10
2
votes
1 answer
Formatting Chinese converted date by time4j to Gregorian in Java
I am working on a project in Java and I need to change different types of dates to each other like (Gregorian to Chinese and vice versa and Gregorian to Hijri and vice versa). I try to use Time4j which has this facility to convert different types of…

Ali Ansari
- 152
- 1
- 1
- 15
2
votes
1 answer
How to use Chinese characters in libtcod?
I have an idea of using Chinese characters as an entities in my ASCII-like roguelike console game. I'm using python-tcod, but I don't know if there is a way to use Chinese characters in it.
I tried setting Chinese fonts through…

Quakumei
- 57
- 6
2
votes
0 answers
How to display chinese characters in pdf using itextg 5.5.9 in android
I am using itextg 5.5.9 for generating a pdf. All the english characters are displayed correctly but the chinese characters are not displayed. Is there any way to display chinese characters on pdf.
Here is the code.
Font fontbold =…

Vaibhav More
- 994
- 3
- 10
- 22
2
votes
3 answers
MySQL 5.7 miss matching against two-Chinese-character words
Table tb:
title keywords
企业贷款,该如何看懂银行流水 出口退税,贷款,现金流量表,利润表
最高人民法院关于审理民间 企业贷款,合同法,贷款
中国宏观经济数据点评 企业贷款,贷款
ngram_token_size=2
FULLTEXT INDEX `keywords_title`(`keywords`, `title`)
Now I match keywords and title…

AarioAi
- 563
- 1
- 5
- 18
2
votes
0 answers
jboss jbpm task comment does not accept Chinese
Jboss JBPM user task comment does not accept Chinese.
Seems related to UTF-8. I tried to alter table charset. Not working yet.
ALTER TABLE task_comment MODIFY text longtext CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
How can I fix this…

Hao
- 6,291
- 9
- 39
- 88
2
votes
1 answer
Node Request error: The header content contains invalid characters?
Request is easy to use, however, I encountered a strange problem:
TypeError: The header content contains invalid characters
This is my code(very simple, just a GET request):
let request = require('request');
let url =…

pigLoveRabbit520
- 513
- 7
- 19
2
votes
1 answer
How to avoid Hugo stripping unicode characters from page's slug?
I am working with Chinese content (using UTF-8), while most of the time it generates the right url, sometimes it strips certain Chinese characters from URL.
Some examples of these characters are:
〇
○
〡
〤
〢
⺮
〣
When generating a page for each…

marcanuy
- 23,118
- 9
- 64
- 113