Questions tagged [gbk]

GBK is an extension of the GB2312 character set for simplified Chinese characters, used in the People's Republic of China.

47 questions
1
vote
1 answer

read files with different encoding format using sys.stdin in python3

I have many files which are encoded with UTF-8 or GBK. My system encoding is UTF-8 (LANG=zh_CN.UTF-8), so I can read files encoded with UTF-8 easily. But I must read file encoding with GBK as well. I'm following Python 3: How to specify stdin…
Yaozong Li
  • 37
  • 6
1
vote
1 answer

boost read_json throw exception when the json file has some gbk chinese charactor

there is a json file like this, without bom, use gbk code set. The boost::property_tree can parse it successfully in the majority. try { boost::property_tree::read_json(filename, tree); } catch (exception &e) { cerr << e.what() <<…
Li Da
  • 41
  • 4
1
vote
1 answer

How to make the browser displays this hexadecimal value (in GBK)?

If i do echo(0xbf5c); it renders 0xbf5c. But it normally correspond to a chinese letter. How can i make this latter displayed ? Thanks
aurel_lab
  • 149
  • 11
1
vote
0 answers

Emacs magit chinese file name displayed as as /320/320/322 in Windows?

My magit use git with cygwin, and my default coding is gbk. I tried to modify the .git/config, but not work. [core] quotepath = false [gui] encoding = gbk [i18n] commitencoding = gbk logoutputencoding =…
QZHua
  • 354
  • 2
  • 10
1
vote
1 answer

Chinese Character Encoding (UTF-8, GBK)

I have a web crawler that is run on different websites (Chinese in this case). Now when I retrieve the data and display it on my website, the Chinese characters all end up as garbage. Well I read about character encoding, And I found out that UTF-8…
UnitedSince88
  • 33
  • 1
  • 6
1
vote
2 answers

python call command line with Chinese Characters in windows fails

Under python in windows, in py script (test.py), os.system or subprocess.Popen calling the dos command fails, but succeeds under command line (windows->cmd.exe), the script is as the following additional info: 1. the dos (windows->cmd.exe) encoding…
Oscarzhao
  • 75
  • 1
  • 9
1
vote
0 answers

How to convert the charset of HTTP GET data from GBK to UTF8 in Titanium Mobile?

Websites in China always use gbk charset. I attempt to get the data from a site: var url = "http://nga.178.com/thread.php?fid=7"; var client = Ti.Network.createHTTPClient({ // function called when the response data is available onload :…
WildCat
  • 1,961
  • 6
  • 24
  • 35
1
vote
1 answer

gbk encoding with string "赵孟頫"

Here is the code in python activation mode: >>> s = u'赵孟頫' >>> s.encode('gbk') '\xd5\xd4\xc3\xcf\xee\\' Why does the GBK string has a trailing backslash?
Zhang Jiuzhou
  • 759
  • 8
  • 22
1
vote
1 answer

What is the differnence between gbk and cp936

My locale encoding is 'gbk' in other programming tools as I am a simplified Chinese user. But in Python, it is 'cp936'. I find that 'cp936' may be the same as 'gbk', because what 'gbk' can||can not decode also can||can not be decoded in 'cp936'... …
罗泽轩
  • 1,603
  • 2
  • 14
  • 19
0
votes
0 answers

The return result of the terminal command cannot be decoded normally

I wrote the following command to get the list of available WIFIs: result = subprocess.run("netsh wlan show network", shell=True, stdout=subprocess.PIPE, text=True, encoding="gbk") This code…
0
votes
1 answer

How to make ".gbk" file from gbff/gff/fna/gb or any Genbank file format?

I am using a software needs reference geneome in .gbk format (which is obseleted by genebank and is replaced by gbff). I searched to find a file convertor however I failed. I supposed gb and gbk are the same, so I renamed gb to gbk, however didnt…
Nar_sys
  • 9
  • 4
0
votes
0 answers

anti-SMASH antismash --check-prereqs TRACEBACK and IMPORT ERRORS

I am now trying if my recently installed anti-SMASH would work. However, the following lines appear as I type antismash --check-prereqs: Traceback (most recent call last): File "/home/promt/asenv/bin/antismash", line 5, in from antismash.main…
0
votes
1 answer

iconv example to convert UTF-16BE Chinese simplified covert to GBK

I am trying to covert UTF-16BE BOM to GBK via iconv command line. can somebody help me create linux command example for this. good morning in chinse simplified as per google translator is 早上好 (HEX fe ff 65 e9 4e 0a 59 7d ) how can I covert this…
Anas
  • 13
  • 2
0
votes
0 answers

How to support UTF-8 on Windows without using "chcp 65001" command in C++?

I want to support UTF-8 string in my program, but the default active code page is 936. Is there any methods to support UTF-8 without using the chcp 65001 command? And the std::locale doesn't seem to work, it always throws an error when I'm using…
0
votes
1 answer

PDcurses:why can not work for Chinese characters?

I'm learning pdcurses on visual studio with GBK code, and it shows garbled when I use printw(), addstr() and addwstr() to print Chinese characters. I just tested the three functions, but I think all these printing functions won't work for Chinese.…
通配符
  • 1
  • 1