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. Maybe UTF-8 will work(I don't test that because visual studio can not fit UTF-8 well)?
PDcurses:why can not work for Chinese characters?
106 Views Asked by 通配符 At
1
There are 1 best solutions below
Related Questions in C
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in UTF-8
- Site code to enable UTF-8 to EBCDIC encoding
- Wrong output when str_replace with acute ( ´ ) in utf-8 website
- How to encode bytes as a printable unicode string (like base64 for ascii)
- showing umlauts in html with utf8 charset
- Replace special qoutes with normal
- wxWidgets and UTF8 - some characters missing
- Detecting corrupt characters in UTF-8 encoded text file
- Control encoding when parsing SPSS file using package memisc
- Slidify no longer renders accent marks
- javascript treating special characters as utf characters
- Character encoding is missing at a point
- Search special characters with pg_search
- Hot deploying HTML templates generates question marks in the place of chinese characters - only on CentOS
- Reading from property file containing utf 8 character
- Problems with UTF8 text in XE7 ReadLn command
Related Questions in CHARACTER-ENCODING
- How to encode bytes as a printable unicode string (like base64 for ascii)
- FPDF with iconv from utf8mb4
- Char encoding and SQL in C#
- How to set only one table charset to utf8mb4 without change mysql configuration?
- Why does opening a file in two different encodings work as expected?
- —- " added in HTML when converting MarkDown file to HTML using Jekyll tool
- Unicode error. database malfunctions
- Can we convert ANSI encoded CSV file to utf-8 encoded file with javascript?
- Determining ISO-8859-1 vs US-ASCII charset
- Unexpected Python String Encoding of '/b'
- Rails ActiveRecord string field encoding vs Ruby String encoding
- Jekyll JSON incorrect character encoding
- Nodejs encoding issue
- How do I encode HTML characters within Javascript functions?
- Specifying Encoding While Placing Files In InDesign Using Extendscript
Related Questions in PDCURSES
- Compiling PDCurses into ".a", error with mingw command
- UniCurses pdcurses.dll Error
- PDCurses missing seperator error in Cygwin
- CMake can't find PDCurses on MinGW
- Cannot link pdcurses static debug build with VS2013
- PDCURSES assignign value to integer make error
- PDCurses getch does not work
- NMAKE : fatal error U1052: file 'Makefile.vc' not found
- How do I turn off or ignore key repeat for my curses application?
- making pdcurses work with C++ Builder
- can mvprintw(), curses function work with usual ascii codes?
- Disabling Windows Alt-Codes in PDCurses
- Menus library with PDCurses
- menu.h && form.h doesn't exist in pdcurses
- PDcurses:why can not work for Chinese characters?
Related Questions in GBK
- How can I retrieve a record with Chinese characters in Java programming?
- How to compare non-English(Chinese) Characters in python program?
- Is there a solution to run non-unicode (GBK) program in linux?
- PDcurses:why can not work for Chinese characters?
- iconv example to convert UTF-16BE Chinese simplified covert to GBK
- anti-SMASH antismash --check-prereqs TRACEBACK and IMPORT ERRORS
- Python3 ZipFile how to write non-utf8 filename to archive by using writestr function
- How to write windows-936 to log When wchar_t in the code by boost.log
- Emacs magit chinese file name displayed as as /320/320/322 in Windows?
- boost read_json throw exception when the json file has some gbk chinese charactor
- read files with different encoding format using sys.stdin in python3
- How to convert the charset of HTTP GET data from GBK to UTF8 in Titanium Mobile?
- why does file.tell() affect encoding?
- Chinese Character Encoding (UTF-8, GBK)
- Why ISO 2022 defined 94- and 96-?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I know how to do. At first I compiled the pdcurses.dll with "WIDE=Y DLL=Y" option, as I thought Chinese characters are wide charcaters. In this case neither GBK nor UTF-8 will work for Chinese. Then I added "UTF8=Y" when making, the result was improved: when using UTF-8 to code, it can show right Chinese characters, though it puts a Chinese character, which is wide charcter and is the length of two English letters, in the size of one English letter, which makes it complete mess. So I just throw away "WIDE=Y" and "UTF8=Y" and then get the correct result. Really annoying.