Questions tagged [chinese-locale]

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

398 questions
4
votes
2 answers

How can I get rid of having to prefix a WHERE query with 'N' for Unicode strings?

When searching for a string in our database where the column is of type nvarchar, specifying the 'N' prefix in the query nets some results. Leaving it out does not. I am trying the search for a Simplified Chinese string in a database that previously…
bluiska
  • 369
  • 2
  • 12
4
votes
1 answer

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
  • 503
  • 6
  • 19
4
votes
1 answer

How to display/print Chinese characters with knitr::spin

I have recently began using knitr::spin() to quickly convert my code into into html reports and so far it has been amazing. However, I have run into a problem when attempting to include Chinese characters in either text or the code sections. Here is…
4
votes
2 answers

Why doesn't this substring work in Chinese?

Why doesn't this substring work in Chinese? I'm getting the correct results for other languages but in Chinese I got an empty string. countryID = "奥地利(销售超过3万5千欧元)"; countryID.substring(0, countryID.indexOf('(') - 1); countryID =…
CMartins
  • 3,247
  • 5
  • 38
  • 53
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…
A_G
  • 2,260
  • 3
  • 23
  • 56
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
  • 16,450
  • 15
  • 56
  • 112
4
votes
1 answer

How to URL encode Chinese characters?

I used the following code to encode parameters list: params['username'] = user params['q'] = q params = urllib.quote(params) But it doesn't work when q is equal to 香港. The following error is returned: 'ascii' codec can't encode characters in…
LA_
  • 19,823
  • 58
  • 172
  • 308
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
  • 159
  • 1
  • 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
  • 3,136
  • 4
  • 30
  • 55
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
  • 13,266
  • 14
  • 86
  • 134
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
2 answers

How to refer to a Chinese character in C code

I have a C program that currently reads in Chinese text and stores them as type wchar_t. What I want to do is look for a specific character in the text, but I am not sure how to refer to the character in the code. I essentially want to say: wchar_t…
Alex Hansen
  • 301
  • 2
  • 9
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

libGDX, printing non-western fonts

I'm in the middle of finishing my libGDX android game and I have problems with making localizations. I want my game to be localized in Polish, English, Arabic and Chinese. To do this, I'm using libgdx I18NBundle which works perfectly fine. I have no…
Kierek93
  • 127
  • 2
  • 8
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
1 2
3
26 27