Sponsored Content
Full Discussion: Executable file in C
Top Forums Programming Executable file in C Post 302336927 by jim mcnamara on Thursday 23rd of July 2009 06:00:56 AM
Old 07-23-2009
Characters like that are usually unprintable because they are not ASCII, i.e., characters less than 128 in the C (POSIX) locale

isprint() and other functions that classify characters base their decisions on the locale.

Code:
The isprint() function shall test whether c is a character of class print in the program's current locale; see the Base Definitions volume of IEEE Std 1003.1-2001

localedef is used to set up what characters in a non-standard locale are printable.

To answer you question, it sounds like your code is running against a character codeset that is not compliant with your locale - and your old program was not working correctly when it said it could print a non-ascii character.

post the code.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Newbie question about difference between executable file and ordinary file

Hi, I am newbie in unix and just started learning it. I want to know what is the difference between an executable file and a file (say text file). How to create executable file? What is the extension for that? How to differentiate ? How does it get executed? Thanks (1 Reply)
Discussion started by: Balaji
1 Replies

2. UNIX for Dummies Questions & Answers

file with executable permission

Hi All, How can we execute a Unix file (shell script), which had given "Execute" permission using chmod +x file1 If i want to execute that file. prompt>./file1 Hello How can i make the file permission or something else. such that i can execute it using prompt>file1 Hello Note :... (9 Replies)
Discussion started by: anent
9 Replies

3. UNIX for Dummies Questions & Answers

creating executable for every C file

hello Folks, once we compile any C code on Linux, we run the code using "./a.out".. but can we have an executable for every program so that we can run the code directly without compiling the code every time. just run the executable and get the output! Thanks! (7 Replies)
Discussion started by: compbug
7 Replies

4. Shell Programming and Scripting

Executable file

Hi everybody: I have strange problem. I have compiled a source code and created an executable file. This file I can use it into my PC, but when I copy this executable to my laptop this one doesn't work and the system tell me: bash: ./sbdart_unix: cannot execute binary file Somebody can... (3 Replies)
Discussion started by: tonet
3 Replies

5. Programming

Running an executable file

I've created a c program and compiled it with gcc, in unix. The file name is abc.c and it is run by typing the command ./abc I have another program which creates a child process, and I need this abc program to run on that child process. I've tried execvp(), but it doesn't work. How can I run... (2 Replies)
Discussion started by: sdsd
2 Replies

6. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

7. Shell Programming and Scripting

executable file

Hi, I want to know that how can i read the content of a .exe file?? Thanks (1 Reply)
Discussion started by: ss_ss
1 Replies

8. Shell Programming and Scripting

unix executable file

Hi - How can I find out under sh whitch file is an unix executable file? Need it for an software inventory. Thanks in advance. Regards - Lazybaer (6 Replies)
Discussion started by: lazybaer
6 Replies

9. Solaris

file just loaded does not appear to be executable

Hi When i m trying the boot the system with Primary HDD (c1t0d0s0) -- its solaris 10 I m getting an error "file just loaded does not appear to be executable".....So will anyone share the steps to recover from this stage I also tried to build the corrupted superblock from below command but... (0 Replies)
Discussion started by: taruntan
0 Replies

10. Solaris

Executable file on Solaris

Hi! What are executable file formats in Solaris? Can someone please share it? Thanks! (3 Replies)
Discussion started by: Klyde
3 Replies
dumpcs(1)							   User Commands							 dumpcs(1)

NAME
dumpcs - show codeset table for the current locale SYNOPSIS
dumpcs [-0123vw] DESCRIPTION
dumpcs shows a list of printable characters for the user's current locale, along with their hexadecimal code values. The display device is assumed to be capable of displaying characters for a given locale. With no option, dumpcs displays the entire list of printable characters for the current locale. With one or more numeric options specified, it shows EUC codeset(s) for the current locale according to the numbers specified, and in order of codeset number. Each non-printable character is represented by an asterisk "*" and enough ASCII space character(s) to fill that code- set's column width. OPTIONS
-0 Show ASCII (or EUC primary) codeset. -1 Show EUC codeset 1, if used for the current locale. -2 Show EUC codeset 2, if used for the current locale. -3 Show EUC codeset 3, if used for the current locale. -v "Verbose". Normally, ranges of non-printable characters are collapsed into a single line. This option produces one line for each non-printable character. -w Replace code values with corresponding wide character values (process codes). ENVIRONMENT VARIABLES
The environment variables LC_CTYPE and LANG control the character classification throughout dumpcs. On entry to dumpcs, these environment variables are checked in that order. This implies that a new setting for LANG does not override the setting of LC_CTYPE. When none of the values is valid, the character classification defaults to the POSIX.1 "C" locale. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------------------------------------+ |ATTRIBUTE TYPE ATTRIBUTE VALUE | |Availability SUNWcsu | +-----------------------------------------------------------+ SEE ALSO
localedef(1), attributes(5) NOTES
dumpcs can only handle EUC locales. SunOS 5.11 20 Dec 1996 dumpcs(1)
All times are GMT -4. The time now is 09:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy