Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Displaying the € symbol in DOS from a C Program??

  • 13-10-2006 1:53pm
    #1
    Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭


    Howdy all,

    I am creating a little program for myself that calculates tax etc using C as my programming language. However, the euro symbol doens't come out in DOS.

    Is there a way to do this or does DOS not recognise it at all?

    Thanks


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    <snip>

    Never mind


  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    Who what where why when?


  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Thought I had found a solution, turns out not so much.


  • Closed Accounts Posts: 1,567 ✭✭✭Martyr


    don't think you can do it.
    even old pound symbols don't display..DOS only supported ASCII character encoding, & the pound symbol was never part of it.
    your best to use the letter E, no?


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Actually if its XP it should display the euro if your set to a locale that supports the Euro.

    Load up Charmap.exe (character map) and select the U+20AC character. If you paste that into Dos box you will see it.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    Hobbes wrote:
    Actually if its XP it should display the euro if your set to a locale that supports the Euro.

    Load up Charmap.exe (character map) and select the U+20AC character. If you paste that into Dos box you will see it.

    Yea but if I am creating a C program from a text file. Then I compile it and view it in dos how do I do it?

    There must be something I can type into the text file that will produce a € in dos.


  • Closed Accounts Posts: 198 ✭✭sh_o


    Are you certain that your dos window can display a € sign?

    If it can't, then you need to configure the correct codepage - google for: Euro Codepage dos
    And that will give you the answer.

    If it can print out a Euro sign , then look more closely at your c program and reduce it down to just a main method and a printf -
    I presume you can also print out the character code and that will be translated to the requisite sign (that is if the € sign is not supported itself).

    What compiler are you using? Are you also compiling under dos?


  • Registered Users, Registered Users 2 Posts: 9,844 ✭✭✭py2006


    sh_o wrote:
    Are you certain that your dos window can display a € sign?

    If it can't, then you need to configure the correct codepage - google for: Euro Codepage dos
    And that will give you the answer.

    If it can print out a Euro sign , then look more closely at your c program and reduce it down to just a main method and a printf -
    I presume you can also print out the character code and that will be translated to the requisite sign (that is if the € sign is not supported itself).

    What compiler are you using? Are you also compiling under dos?

    Yep, compiling using Borland in DOS. The € doesn't come out in a normal printf. Its comes out as a C or something similar.


  • Registered Users, Registered Users 2 Posts: 2,082 ✭✭✭Tobias Greeshman


    If it's not supported then there's not much you can do

    Although if you printed out ascii 'C' 'backspace control char' and a '=' it might work. I know I've heard it works on really old systems. Put them in a string using "\x43\x..\x.." and use printf. It might work and it might not.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    As I said you need to pass a unicode string of U+20AC.


  • Advertisement
  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    Hobbes wrote:
    As I said you need to pass a unicode string of U+20AC.
    Dos supports unicode?


Advertisement