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

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

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


    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 Posts: 9,847 ✭✭✭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 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 Posts: 9,847 ✭✭✭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 Posts: 9,847 ✭✭✭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 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 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