I have set my system to display Chinese for non unicode programs. However,
this wrecks havoc with DevC++ as some characters show up as strange chinese
looking characters. How can I maintain my setting and have DevC++ working
normally?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you changed the system to display Chinese you should have changed both
the user locale (Formats tab) and the system locale (Administrative tab) to
Chinese.
Assuming you did that you probably have have Chinese characters in your source
code. To display them correctly you need to change the default Dev C++
codepage to windows-936 (Chinese simplified) or windows-950 (Chinese
traditional). This is the codepage for the file which is independent of the
system setting. If that doesn't work try the unicode setting UTF-8.
I don't have Dev-Cpp installed but there should be a "file encoding" option
somewhere in the options.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I only changed the system locale to Chinese because I use an English version
of Windows 7, and most of my programs are in English, just when I have one or
two odd programs that are in Chinese I need Windows to display it.
My code does not have Chinese characters. It is all English, yet these strange
characters appear.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is not file encoding. The quote marks on line 22 are not ascii
quote marks, they are something else. I don't think the problem is Dev-C++.
Your keyboard might not be entering the correct character. If you copied the
code from somewhere that could be the problem.
To correct it replace line 22 with:
system("PAUSE");
It should then compile.
When the quote marks are entered correctly the "PAUSE" will be colored in the
string color. The default color is red, but you might have changed that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have set my system to display Chinese for non unicode programs. However,
this wrecks havoc with DevC++ as some characters show up as strange chinese
looking characters. How can I maintain my setting and have DevC++ working
normally?
Where are the strange characters displayed? Are they in the source code
listing or somewhere else?
When I use Dev C++ as an IDE (or text editor for that matter), some code would
display as strange characters.
When you changed the system to display Chinese you should have changed both
the user locale (Formats tab) and the system locale (Administrative tab) to
Chinese.
Assuming you did that you probably have have Chinese characters in your source
code. To display them correctly you need to change the default Dev C++
codepage to windows-936 (Chinese simplified) or windows-950 (Chinese
traditional). This is the codepage for the file which is independent of the
system setting. If that doesn't work try the unicode setting UTF-8.
I don't have Dev-Cpp installed but there should be a "file encoding" option
somewhere in the options.
I only changed the system locale to Chinese because I use an English version
of Windows 7, and most of my programs are in English, just when I have one or
two odd programs that are in Chinese I need Windows to display it.
My code does not have Chinese characters. It is all English, yet these strange
characters appear.
It sounds like the file encoding is not correct. If the code is all English
the file may be UTF-16 encoding, or even utf-32 or utf-7.
Can the encoding be changed with Dev-cpp? If it can, change it and try to find
a code that displays correctly.
If you can make the file available I can probably find the encoding.
Here's the file
http://www.fileserve.com/file/tX42Zd7
The problem is not file encoding. The quote marks on line 22 are not ascii
quote marks, they are something else. I don't think the problem is Dev-C++.
Your keyboard might not be entering the correct character. If you copied the
code from somewhere that could be the problem.
To correct it replace line 22 with:
system("PAUSE");
It should then compile.
When the quote marks are entered correctly the "PAUSE" will be colored in the
string color. The default color is red, but you might have changed that.
ahhhhhh, thanks.