Questions tagged [chinese-locale]
Questions related to specific aspects of machine-processing Chinese language, or to code that is executed under Chinese localization settings.
387
questions
0
votes
1
answer
26
views
Encoding Chinese characters to open JSON file in python
I am unable to open a json file containing chinese and english characters. I have tried using-
with open('.//train//chess.json') as f:
d = json.load(f, encoding = "UTF-8")
I have also ...
-2
votes
0
answers
55
views
Calculate Chinese lunar age in Java
How do we calculate Chinese lunar age in Java, I am trying the following but it's not correct
android.icu.util.Calendar dob = ChineseCalendar.getInstance();
android.icu.util.Calendar today = ...
2
votes
1
answer
30
views
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://...
1
vote
1
answer
72
views
Converting calendar dates to Chinese lunar dates in Google Sheets
I'm trying to convert calendar dates to Chinese lunar dates in google sheets. But I have difficulties. It is easy to do in excel by using formula:
`=TEXT(A2; "[$-130000]dd.mm.yy")`
But it doesn'...
0
votes
0
answers
50
views
MSSQL record and display all languages in table including English, Chinese and Arabic [duplicate]
The service on my Windows Server using MS-SQL is using a variety of languages but non-English characters like Chinese and Arabic are recorded as ??????????????
The database fields are set to [nvarchar]...
1
vote
0
answers
49
views
Powershell v5 Get-Content (Chinese file names) amending. Filename/path not found or excluded
I have been trying to figure this out for the past hour. I have Chinese named filenames, however im using powershell version: 5.1.22000.653. If I change it to test.lua it works just fine. However, ...
0
votes
1
answer
40
views
Google speech recognizer for Traditional Chinese text
I want to output the speech to traditional chinese but it output to simplify chinese instead. My codes:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(...
0
votes
0
answers
25
views
How to display Chinese in programs on CentOS7 system?
I am writing a c program in CentOS7(using VMware), l have succeed in making my system language Chinese, but But the Chinese in my code still cannot be displayed normally. like this
PS:English is not ...
0
votes
0
answers
60
views
Chinese characteres are not properly rendered in CMD/Powershell
I have this rendering issue on Chinese characters on multiple console app: fzf, lazygit and vim (when running fzf).
I have set the chcp to 65001 as default, using the correct font for Chinese (so the ...
1
vote
1
answer
54
views
Cannot identify Chinese character in word2vec
I am a new comer on word embedding and write a simple program to capture the message from my whatsapp to try the word2vec function in R. Everything works well and I can successfully generate the ...
1
vote
1
answer
67
views
Content-length body with mixed latin and chinese characters
I am defining the Content-Length of an HTTP request but because sometimes it might contain chinese characters when it gets to the response side of things, it gets truncated.
I have been trying to get ...
1
vote
0
answers
39
views
Unable to parse input date containing abbreviated asian components using DateTimeFormatter
I'm trying to parse a date string to LocalDate or LocalDateTime (actually any Temporal object), which contains asian abbreviated parts. When I provide a valid abbreviated chinese component(in example ...
2
votes
1
answer
224
views
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 ...
0
votes
0
answers
51
views
The comma and dot (,.) are not getting vertical centrally aligned in traditional Chinese
My application is supporting the Traditional Chinese (zh-Hant-TW) language, I am facing one issue while converting the date to specific format the comma and dot are not getting aligned on vertically ...
0
votes
1
answer
56
views
How to include Simplified Chinese - Mandarin and Cantonese resource locale in Android Studio
I have a requirement to support Simplified Chinese - Mandarin(Hans) and Cantonese(yue) but while trying to add the above locale in Android studio , I'm not getting the exact region specifier. In ...
0
votes
2
answers
120
views
How do I use system("chcp 936") in my dialog based project?
The code below is supposed to convert a wstring "!" to a string and output it,
setlocale(LC_ALL, "Chinese_China.936");
//system("chcp 936");
std::...
0
votes
1
answer
859
views
What is the typical Chinese language code for the Accept-Language header?
Unfortunately, I have no way to check this personally, so I wanted to ask the community about it.
According to RFC 5646, Chinese can have the following representation: zh-Hans for Simplified Chinese, ...
0
votes
0
answers
14
views
Web service to convert Simplified Chinese to Traditional Chinese?
Does anyone know of a web service that will accept a simplified Chinese text string and return the Traditional string?
0
votes
0
answers
41
views
Unicode range of Chinese characters (minimum viable)
I'm making a game that needs to be translated into Chinese. I'm making custom bitmap fonts for Chinese. I need unicode ranges for the Chinese "alphabet". I want to compact this as much as ...
1
vote
0
answers
52
views
How can you Internationalize Chrome Extension for Cantonese (Hong Kong)?
How can you Internationalize Chrome Extension for Cantonese (Hong Kong)?
Internationalizing Your App - Chrome Developers lists Locale Codes that it says you can localize your app in. But for Chinese ...
0
votes
1
answer
144
views
How can I show "$" instead of "US$" in NSnumberFormatter? [duplicate]
I used below code for conversion from NSnumber to currency with locale.
let price = 12.34 as NSNumber
let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.currencyCode = "...
0
votes
1
answer
229
views
Edge browser Speech Synthesis stop working after call speak with some empty paragraph text using Xiaoxiao voice
I'm using SpeechSynthesis APIs on Microsoft Edge browser. But something went wrong...
Here is what I have got so far (already minimized to what can reproduce the result)
I had Chinese language pack ...
0
votes
2
answers
245
views
C programming language using locale.h to print UTF-8 characters
I want to print UTF-8 characters with C programming language. I've tried this but failed:
#include<stdio.h>
#include<stdlib.h>
#include<locale.h>
#include<wchar.h>
int main(){
...
1
vote
1
answer
493
views
Storing Chinese Characters in mysql
Im trying to store chinese characters to mysql database but am unable to.
Changed characterset for the table to utf8 and utf8mb4
Table looks something like this
id bigint(20) NO PRI ...
-1
votes
1
answer
618
views
How to check if a cell value is Chinese text in Excel
I have a list of cells which contain the first name of users: Amy, Jim, 梅, 明, ธนกาญจน์, Андрей, etc. From the name, I would like to determine if a user is Chinese.
Does anyone know if there is any ...
0
votes
1
answer
191
views
Why wordcloud libraries can't use stopwords to block Chinese characters in python
Today, I want to use WordCloud to create a word cloud, but the biggest word is meanless,"的",like "is" in English. I want to remove it, so I create "stopwords" to deal ...
1
vote
0
answers
35
views
I wanna use sscanf to get something from a string
The row string is Chinese,e.g. "九张".And the regular expression is "%[^张]";
Code segment:(mingw-32 ,windows10)
char szTemp[64] = {0};
sscanf("九张","%[^张]",...
1
vote
1
answer
110
views
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 (...
0
votes
0
answers
38
views
Can't declare string with english and chinese letters in C
When I run this program it shows "Dariga gets 7? 吽㤇" instead of "Dariga gets 7? 吽㤇".
#...
0
votes
1
answer
604
views
be chinese fonts in Flutter iOS app set Japanese in MaterialApp
I have an issue that the text in the iOS app display in Chinese font. so I tried three patterns. But it doesn't work only in the build iOS app. In the iOS simulator, all patterns work. How can I ...
0
votes
1
answer
91
views
Chinese open bracket with space - single char
Im working regexes over chinese language I noticed there is a bracket with space Chinese char
')' notice this isn't a ')'+whitespace (one delete stroke will delete it).
What is the opening space+'(' ...
0
votes
1
answer
344
views
How to make matplotlib display Chinese correctly
How to make matplotlib display Chinese correctly.
Thank you .
import numpy as np
from matplotlib import pyplot as plt
import matplotlib
from pylab import mpl
import pymysql
matplotlib.rcParams ['...
0
votes
0
answers
120
views
Chinese character in environ['PATH'] cannot be recognized by cmake
Currently I'm trying to add a toolchain path into os.environ['PATH'] to build my project. The path contains some Chinese chars and the cmake program just cannot recognize the path properly. Everything ...
0
votes
1
answer
512
views
Using R, how to read Chinese characters in text file using `readLines`
I want to read text in one line at a time. The file is found in an online repository. I am showing a small sample.
t.file = "http://md5.mshaffer.com/WSU_STATS419/stackoverflow/chinese/test.txt&...
1
vote
3
answers
872
views
Reading a file that contains chinese characters (C++)
I got issues reading a file that contains chinese characters. I know that the encoding of the file is Big5.
Here is my example file (test.txt), I can't include it here because of the chinese ...
0
votes
1
answer
76
views
How to identify the tones in Chinese text?
Is there a programmatic way to identify the tones in Chinese text?
For an input string like 苹果 I need to extract the tones as 2 and 3 as it would be indicated in the pinyin transliteration píng guǒ or ...
0
votes
1
answer
122
views
How to search Chinese characters in Vim quickly?
I want to convert all string in Chinese to i18n, and want to search them all.
0
votes
0
answers
610
views
How do I detect Chinese characters using REGEX or a SQL query?
I'd like to detect Chinese characters in a redshift postgresql database using a SQL query.
An acceptable answer can include regex since I can use regexp_instr.
I think that this will detect non-...
0
votes
1
answer
232
views
Build Qt from source so that it accepts Chinese input
I build Qt from source on Debian buster but now I cannot input Chinese on a QLineEdit. Chinese input works for all other applications execpt the one I build with that Qt I build from source. If I ...
0
votes
1
answer
461
views
How to find chinese and english character in NodeJS?
I have a string containing Chinese and English characters and I want to split the string into the individual Chinese and English characters.
Here are some examples:
hello 你好
你好 你好 hello
This page ...
1
vote
1
answer
61
views
Parameterised string issue in android app
I have a android app in which I am adding localisation support. I have a string with parameter in my xml file .
<string name="str_x_seconds">%1$d seconds</string>
String value in Chinese ...
1
vote
1
answer
260
views
Invalid token or compile time error for japanese/chinese characters in C#
public partial class Form1 : Form
{
public static string TestApp_ListItem_騾髏魄鮴鯰鰰鴃鶲_b4823038;
public Form1()
{
InitializeComponent();
}
}
As in ...
3
votes
1
answer
1k
views
Python convert utf-8 bytes to string
I have difficulties converting those bytes to string:
x = b'<strong>\xc5\xb7\xc3\xc0\xd0\xd4\xb8\xd0\xd0\xb1\xc1\xec\xb5\xa5\xbc\xe7\xb3\xa4\xd0\xe4\xb2\xbb\xb9\xe6\xd4\xf2\xc1\xac\xd2\xc2\xc8\...
2
votes
1
answer
191
views
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 = ...
1
vote
1
answer
2k
views
How to change permission dialog language in the react-native android project?
I want to change the language of the permission allow string in the react-native android project.
I tried with the following code, but it opens the permission dialog twice.
The first dialog is with ...
0
votes
1
answer
516
views
PHP can't display Chinese character
I just migrated my codebase to a new server. Previously, the user saves Chinese characters to the MariaDB database. In the database it saves as below:
This is the text when I copy the content from ...
1
vote
1
answer
103
views
Chinese text-to-speech problems on iOS
We try to use build-in iOS text-to-speech tool for reading Chinese words in the app.
It's good in reading texts. But got problems reading separate words.
For example, we have character 还. It could be ...
0
votes
1
answer
333
views
Making a Wordcloud from a Whatsapp text file with Chinese Characters
I'm very new to programming and I'm trying to generate a word cloud from a WhatsApp text file that has Chinese characters in it.
I've been trying to combine two tutorials I found on the web and it is ...
3
votes
0
answers
2k
views
How do I display Chinese text properly in R Studio?
I'm Chinese, and deal with Chinese characters frequently. I still can't find a way to properly encode Chinese.
The best way so far is read.csv(file_name, fileEncoding = "UTF8"). But when I list all ...
2
votes
0
answers
264
views
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 _ : ...