Questions tagged [chinese-locale]

Questions related to specific aspects of machine-processing Chinese language, or to code that is executed under Chinese localization settings.

369 questions
4
votes
1 answer

Special - Chinese characters in string

I am doing language translation in code. self.title.text = [NSString stringWithFormat:NSLocalizedString(@"Q%ld", nil), (long)quizNumber]; I have added localization which works fine in French case but in Chinese '%ld' comes on the screen. If I put…
4
votes
2 answers

Any JTextField descendant or replacement who covers more Chinese characters?

I'm working on an application, which uses a JTextfield object as a text input component. During some tests I've seen that not all Chinese characters can be shown using this component. At first this seems normal: some Chinese characters are that…
Dominique
  • 8,687
  • 9
  • 28
  • 67
4
votes
2 answers

How to find the first Chinese character in a java string

How to find the first Chinese character in a java string example: String str = "xing 杨某某"; How can i get the index of first Chinese character 杨 in above str. Thanks!
star
  • 139
  • 11
4
votes
1 answer

Viewing Chinese/Korean/Lunar birthday on org-agenda?

I have a few people around me who use Lunar Calendar instead of Gregorian one, so my current set up: *** Birthdays :PROPERTIES: :CATEGORY: Birthday :END: **** NAME <1980-09-09 Thu +1y> fails to show up at the right time on org-agenda. I know that…
THIS USER NEEDS HELP
  • 2,499
  • 2
  • 27
  • 50
4
votes
1 answer

Locale fallbacks in Rails 4 not working

I am building a Rails 4 site for a client in Singapore, Malaysia, Taiwan and China. The locale code for a Chinese speaking Malaysian is zh-MY. I would like to keep a base zh-CN (Simplified Chinese) set of locale files and for zh-MY to fallback to…
Dave Sag
  • 12,289
  • 8
  • 77
  • 118
4
votes
0 answers

How to read and output Hindi in R console?

I have been trying to read and output a Hindi .txt file into the R console but I get gibberish. This is what I did so far. hindi <- read.table('hindi_text.txt') hindi 1 कà¥à¤¯à¤¾ बोल रहे हो तà¥à¤® Then I typed this. It still…
4
votes
1 answer

DomPDF generation for chinese characters

I am trying to generate a PDF that will contain Chinese characters using dompdf. Here is my code: require('dompdf/dompdf_config.inc.php'); $dompdf = new DOMPDF(); mb_internal_encoding('UTF-8'); def("DOMPDF_UNICODE_ENABLED", true); $html = ' …
4
votes
2 answers

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

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…
sweetnsour
  • 65
  • 1
  • 5
4
votes
0 answers

Display characters instead of unicode numbers in PyCharm watch window

The problem I have can be re-produced by pasting this code into PyCharm: chinese = [u'这', u'是', u'一', u'些', u'中', u'文'] print chinese When you set a breakpoint at the print line and start debugging, you could see tha the variable chinese in the…
Yuhuan Jiang
  • 2,231
  • 2
  • 12
  • 20
4
votes
5 answers

How to display Chinese in pandas plot?

Here, I have a plot work to do with pandas, like this : most_active_posts.plot(x = 'title',y = 'active_span',kind = 'barh') most_active_posts is an object of dataframe with index, I want a simple two-dimentional plot with two columns, one is…
joe
  • 177
  • 1
  • 10
3
votes
0 answers

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 the files in the wd using dir(), it comes up…
user155624
  • 31
  • 2
3
votes
0 answers

Why when I use select statement like "select * from table_name where character='⺎' " then return '尢','⼪','⺎' and '⺐'

Mysql query returns mismatched records, such as the query field character='兀' but matches out, 尢, ⺎, ⺐? I update my mysql from 5.7 to 8.0,in 5.7,this problem is more common drop database if exists `chinese_sort`; create database `chinese_sort`…
StringTek
  • 31
  • 2
3
votes
2 answers

Using AVSpeechSynthesizer for Chinese pinyin

In my Swift program, I use AVSpeechSynthesizer to pronounce Chinese characters. This is my method: static var synth = AVSpeechSynthesizer() static func speak(string: String) { let utterance = AVSpeechUtterance(string: string) …
Jonathan Rachlin
  • 333
  • 3
  • 13
3
votes
1 answer

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
  • 8,291
  • 10
  • 65
  • 90
3
votes
0 answers

getString() always return the default language strings. How to check is the app is looking for the localised string file?

Based on the Android documentation : https://developer.android.com/training/basics/supporting-devices/languages https://developer.android.com/guide/topics/resources/localization I have created a ressource file for the zh locale : And I have…
NoonanRosenblum
  • 481
  • 5
  • 18
1 2
3
24 25