hi,all
I write a snippet(in VC6.0 PLATFORM) to show the ASCII character
ranging from 0-255.
snippet:
#include "stdafx.h"
#include "stdio.h"
#include "conio.h"
int main(int argc, char* argv[])
{
int i = 0;
for(i = 0; i < 255; i++)
{
printf("%d = %c\n", i, i);
}
getch();
return 0;
}
IT can normaly show 0-127,but cannot show 128-255 just like "219=?".
what's the problem?
Any one can help?
Thx.
-----------------pinkfog--------------- 15 1854
pinkfog opined: hi,all I write a snippet(in VC6.0 PLATFORM) to show the ASCII character ranging from 0-255. snippet: #include "stdafx.h"
Don't know what this is (it's not Standard C), but you don't need it
anyway.
#include "stdio.h"
#include <stdio.h>
#include "conio.h"
Not Standard C. Probably don't need this either.
int main(int argc, char* argv[]) { int i = 0;
Superfluous inititalisation , as you initialise it below.
for(i = 0; i < 255; i++) { printf("%d = %c\n", i, i); } getch();
This is non-standard (comes from "conio.h"). What's wrong with the
standard `getchar()`?
return 0; }
IT can normaly show 0-127,but cannot show 128-255 just like "219=?". what's the problem?
ASCII characters are only the ones with codes 0-127. The other problem
is in the setup of your console. Obviously it does not know how to
display all the codes (or you think they should display differently).
Not a C issue, so you may want to ask elsewhere.
--
"The IETF motto is 'rough consensus and running code'"
-- Scott Bradner (Open Sources, 1999 O'Reilly and Associates)
<http://clc-wiki.net/wiki/Introduction_to _comp.lang.c>
pinkfog wrote: hi,all I write a snippet(in VC6.0 PLATFORM) to show the ASCII character ranging from 0-255. snippet:
#include "stdafx.h"
What's this header for?
#include "stdio.h"
prefer #include <stdio.h>
#include "conio.h"
What's this header for?
int main(int argc, char* argv[]) { int i = 0; for(i = 0; i < 255; i++) { printf("%d = %c\n", i, i); } getch();
Why?
return 0; }
IT can normaly show 0-127,but cannot show 128-255 just like "219=?". what's the problem? Any one can help?
Your locale's character set does not include these characters.
--
Ian Collins.
the ASCII character is only rangin from 0-127.
charactor is only ranging from 0-127
pinkfog wrote: hi,all I write a snippet(in VC6.0 PLATFORM) to show the ASCII character ranging from 0-255. snippet: #include "stdafx.h" #include "stdio.h" #include "conio.h" int main(int argc, char* argv[]) { int i = 0; for(i = 0; i < 255; i++) { printf("%d = %c\n", i, i); } getch(); return 0; }
IT can normaly show 0-127,but cannot show 128-255 just like "219=?". what's the problem? Any one can help? Thx. -----------------pinkfog---------------
Well... my favourite text editor already does what your program do and
does it live while I'm editing code. On top of that it also
*highlights* the relevant line when the cursor is on either the opening
or closing brace {}. On top of that it does syntax highlighting. On top
of that it also allows me to fold sections of code to temporarily hide
things I'm not interested in (and remember this is "live" while I'm
editing). And to top it all off it can print, save as RTF save as PDF
and save as HTML the nicely formatted code along with the nice lines.
The only difference is that my editor draws lines based on indentation
while your program auto-indent and draws lines based on braces. But
that's OK, that's what "indent" is for. Oh and yes my editor supports
syntax of more than 40 different languages. sl*******@yahoo .com wrote: Well... my favourite text editor already does what your program do and does it live while I'm editing code. On top of that it also *highlights* the relevant line when the cursor is on either the opening or closing brace {}. On top of that it does syntax highlighting. On top of that it also allows me to fold sections of code to temporarily hide things I'm not interested in (and remember this is "live" while I'm editing). And to top it all off it can print, save as RTF save as PDF and save as HTML the nicely formatted code along with the nice lines. The only difference is that my editor draws lines based on indentation while your program auto-indent and draws lines based on braces. But that's OK, that's what "indent" is for. Oh and yes my editor supports syntax of more than 40 different languages.
Oh crap posted on the wrong thread. Ignore this, sorry... very, very
sorry.
"pinkfog" wrote: I write a snippet(in VC6.0 PLATFORM) to show the ASCII character ranging from 0-255. snippet: #include "stdafx.h" #include "stdio.h" #include "conio.h" int main(int argc, char* argv[]) { int i = 0; for(i = 0; i < 255; i++) { printf("%d = %c\n", i, i); } getch(); return 0; }
IT can normaly show 0-127,but cannot show 128-255 just like "219=?". what's the problem?
The problem is with VC 6.0. The essential core of your program does what
you want in DevC (MingW). It shows the old MS-DOS era glyphs for 128 to
255. Try posting your question where VC is topical. I have it on my
machine but I never used it and don't want to use it.
On 2006-04-12, pinkfog <ch*******@gmai l.com> wrote: hi,all I write a snippet(in VC6.0 PLATFORM) to show the ASCII character ranging from 0-255. snippet: #include "stdafx.h" #include "stdio.h" #include "conio.h" int main(int argc, char* argv[]) { int i = 0; for(i = 0; i < 255; i++) { printf("%d = %c\n", i, i); } getch(); return 0; }
IT can normaly show 0-127,but cannot show 128-255 just like "219=?". what's the problem? Any one can help? Thx. -----------------pinkfog---------------
Look up "locale" and how character sets work. The characters > 127 can
be all sorts of wierd and wonderful things and will depend on the
platform, location, window, locale setting and installed fonts. je****@56.com wrote: charactor is only ranging from 0-127
See below.
Brian
--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Roy W. Andersen |
last post by:
I've been searching google about this for days but can't find anything,
so I'm hoping someone here can help me out.
I'm trying to create zip-files without needing the zip-file extension in
PHP, mainly because I need the ability to both create and extract
zip-files. I've tried a couple of classes found here and there, and they
all seem to have the same problem. I'm currently using PclZip
(http://phpconcept.net/pclzip/) but even the...
|
by: lkrubner |
last post by:
What I need to do is find out what characters in a string are not
supported by the UTF-8 encoding. The problem arises when someone logs
in and uses my php script to create a weblog post. They are presented
with a form that has a textarea. If they type in words and then hit
submit, then all is fine. But if they write their entry in WordPerfect
or Microsoft Word or some such, and copy and paste it, then they might
be bringing strange...
|
by: Walt |
last post by:
We are using ASP.net to develop a new website. The old website uses
legacy ASP connecting to an Oracle database (9.2, W2k3, charecter set
WE8ISO8859P1). The new site connects to the same database but using
ASP.NET.
Our problem is that extended characters are printing out as question
marks. In particular, the "smart quote" characters that MS Word likes
to use are showing up as question marks.
We ran into a similar problem with the...
|
by: thomasamillergoogle |
last post by:
I am building a web page to show a TCP/IP raw packet.
I need to show "special characters" on the web page I am working on.
When I say "special characters" i am talking about tabs, whitespace,
crazy unicode characters, etc etc.
What is the best way to present this to the user?
I am thinking that a large textarea is the only way to display it so it
retains all the special characters.
|
by: jaekim |
last post by:
Visual .NET c# design view is showing "?????" for all the Korean
characters in design view.
In code view, it looks okay.
Did anybody have this kind of problem with foreign characters?
| |
by: prasadoo |
last post by:
Hi everyone,
I am trying to populate DropDownList with French characters but for some characters like é,d' etc.it is not showing the exacts French characters.
Can anybody help me how to populate DropDownList with French characters.
|
by: Peter K |
last post by:
Hi
I am writing an application where I need to process some text read from
files, and write information to a content-management-system.
Unfortunately the CMS does not accept international characters in some text
strings (eg for names of entities), like the Danish Å, Ø, Æ.
Is there an inbuilt, or recognised, method of converting these types of
characters to "ascii" text (to be honest I don't know if "ascii" is the
|
by: ConfusedMay |
last post by:
Hi,
I have an access 97 database that need to be upgraded to 2003. The problem is now on the 2003, the description field in all of my reports are showing up in Chinese characters instead of English. This field is saved as OLE object. How can I fix this problem, since the same report is working just fine with access 97? Is it an access 2003 bugs or there's an issue with OLE object?
Thank you in advance.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |