- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to generate "cent" sign in c code
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 01:00 AM
тАО11-17-2003 01:00 AM
I'm trying to write an application that prints
$1.19 if the amount is greater than 99 cents but print .99 "cents sysmbol" if less than a dollar.
The dollar sign work fine but I can not make the "cents".
I know that the octal equiv is 0242 but can not get it to print to my screen
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 01:15 AM
тАО11-17-2003 01:15 AM
Re: how to generate "cent" sign in c code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 01:21 AM
тАО11-17-2003 01:21 AM
Re: how to generate "cent" sign in c code
Nevertheless, on my system I can get a cent symbol with printf ("%c\n", 162).
(octal 242 == decimal 162).
You can test this without writing a C program:
echo |awk '{printf "%c\n", 162}'
If that doesn't work for you then I think it's a problem with your terminal or emulator, not with C.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 03:23 AM
тАО11-17-2003 03:23 AM
Re: how to generate "cent" sign in c code
I'm trying to send a printf to a Monarch label printer and although I don't get an error, I'm still printing a blank space, no "cent sign".
Any other suggestions?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 03:34 AM
тАО11-17-2003 03:34 AM
Re: how to generate "cent" sign in c code
You need to speak to Monarch or check the manual.
I've used these things in the past and given the correct escape sequences they will usually print most things.
Good luck.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 05:00 AM
тАО11-17-2003 05:00 AM
Re: how to generate "cent" sign in c code
/usr/share/lib/terminfo/?/*
terminfo is a database produced that describes the capabilities of devices such as terminals and printers.
Devices are described in terminfo source files by specifying a set of capabilities, by quantifying certain aspects of the device, and by specifying character sequences that effect particular results.
HTH
Bruno
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 05:34 AM
тАО11-17-2003 05:34 AM
SolutionThe majoir problem is difference between video VT and printer to PC.
VT can use ISO_LATIN1 and you cna find cent at 242 (hex 162). But printer, usually, use PC437 or PC850; so to print you have send code 155 (hex 9B). If you send 155 (hex 9B to VT you send a control code CSI that is same as esc [ (escape followed opened square).
So, you cannot viwe and print the cent sign.
This problem is known by European people.
Bye
Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2003 06:19 AM
тАО11-17-2003 06:19 AM
Re: how to generate "cent" sign in c code
Thanks so much!