Questions tagged [chinese-locale]
Questions related to specific aspects of machine-processing Chinese language, or to code that is executed under Chinese localization settings.
400
questions
-3
votes
1
answer
20
views
Chinese character displaying wrongly/differently on Windows
I notice the word 门 is displaying differently when it is being typed on certain applications such as the search bar in Chrome。
Some website are also showing the wrong character.
[
This only happens in ...
-1
votes
1
answer
57
views
Python, how to rename file with chinese characters
Can't rename file with chinese characters
I tried this
os.rename(file, file.replace(os.path.basename(file),"") + f"{str(filename)}.{filemenu.get()}")
and this
shutil.move(file, ...
0
votes
0
answers
17
views
Transalting from English to Chinese on Python Django
I'm trying to convert my web-app to a couple of different languages in Python Django. I have managed to do so for English and French but the problem comes in when I add the zh hans or zh-cn. I get the ...
0
votes
0
answers
19
views
Bootstrap-Select Chinese Character Search in Country Dropdown(in Chinese Language)
I'm having an issue with the BootStrap-Select.
When it comes to perform Character search with in dropdown options, It works fine with the English Alphabets but does not work at all for Russian, Greeks ...
-1
votes
1
answer
112
views
How to detect if Chinese text contains simplified or traditional characters? [duplicate]
What would be a reliable way in Java to detect if a Chinese Unicode string contains Chinese simplified characters or traditional characters? The assumption is that characters that are common for both ...
0
votes
0
answers
32
views
Is timeStyle.long and .full broken, or have I done something wrong?
I am making an app in swift using Swift UI which uses several different date to string functions and they all seem to work ok for all the locales I've checked besides this one. This works for my home ...
1
vote
1
answer
33
views
When using logging in Python, the locale is set, and the log cannot be obtained
I'm trying to use logging module in Python. It works well expect when I set the loacle.
Here is the sample code(python3.9):
import logging
import locale
from time import asctime
logging.basicConfig(
...
2
votes
1
answer
69
views
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<std::string, std::string> translation;
translation["Type"] = "类型";
...
0
votes
1
answer
100
views
Strapi Navigation Internationalization: can’t save Chinese characters
I enabled internationalization in Strapi and in the Navigation Plugin. Everything works fine, until when I change “Home” to Chinese characters and click the Save button, nothing happens, but when I ...
1
vote
1
answer
66
views
Correct display of Currency TWD
I'm not native to Taiwan, nor do I have any knowledge of Taiwanese Mandarin. Hence it could be that all is as intended. My observation:
NumberFormat format = NumberFormat.getCurrencyInstance(Locale....
0
votes
0
answers
39
views
How to change the font in CSS upon changing the language selection in Django's i18n?
I built a webpage using Django and set up the changing of languages with the internationalization that was built for Django called i18n. I have no problem with the language or translation locale ...
0
votes
0
answers
24
views
Error while using Microsoft Interop Word Library in Chinese and Spanish language Operating Systems
I'm working on a proprietary software that includes code for generating Word document reports for the client's projects. Currently we're undertaking the task of localizing this software for Spanish ...
0
votes
1
answer
25
views
Can `writing-mode: horizontal-tb;` be used per character?
The caron ˇ character in the screenshot is rotated due to it not being recognized as Chinese character, just like the word Prologue in the screenshot is rotated too
ˇ is rotated, hence it looks like &...
0
votes
0
answers
19
views
How to adjust the character in Chinese to have the same height as brackets and numbers?
I'm using Microsoft Word on macOS, but I'm experiencing formatting issues with the "Kaiti" font. Specifically, the characters, brackets, and numbers are not aligned at the same height. ...
0
votes
1
answer
86
views
How to implement a specific parser (Chinese) for PostgreSQL full text search in Django?
I want to implement PostgreSQL full text search in Django 4.0. for Chinese language.
The question already arise in 2010 but there wasn't any suitable solution and they had to move to SQL Server.
In ...
0
votes
0
answers
125
views
Messed support for Intl.DateTimeFormat with Chinese Calendar
new Intl.DateTimeFormat('zh-CN-u-ca-chinese', { dateStyle: 'full' }).format(1680537600000)
The above code outputs 0040闰0214 12:00 上午 in Firefox, 2023癸卯年闰二月十四星期二 in Chrome/node/deno, 2023癸卯年闰二月14星期二 ...
1
vote
1
answer
674
views
jsPDF use Chinese fonts to build PDF from HTML
I am using WordPress Eventin plugin which embedded jsPDF. I have successfully added Chinese fonts SimHei.ttf to jsPDF like that:
const jsPDF = window.jspdf.jsPDF;
const doc = new jsPDF("p", &...
0
votes
1
answer
301
views
How to define aliases of locales in typesafe-i18n?
Motivation
Chinese language has historically multiple language codes (RFC 5646 with ISO-639
zh). Practically, the most frequently used ones are zh-CN (for Simplified Hanzi Script of Chinese Mandarin ...
0
votes
2
answers
367
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
1
answer
432
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
1k
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'...
1
vote
0
answers
53
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
125
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, ...
1
vote
1
answer
197
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(...
1
vote
0
answers
239
views
How can I install Chinese input method in English Debian 11 system?
I tried to install Chinese input method in English Debian 11 system, but after having tried the methods I searched in Google I failed. How should I do? All these input methonds can't input Chinese ...
1
vote
1
answer
99
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
189
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
57
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
551
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
127
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
221
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
281
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::...
3
votes
1
answer
3k
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
83
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
98
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
473
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
425
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
834
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
2k
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 ...
0
votes
1
answer
2k
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
322
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
59
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("九张","%[^张]",...
2
votes
1
answer
206
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
1
answer
989
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
280
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
0
answers
828
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
232
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
878
views
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
1k
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
112
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 ...