Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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

  • 13-10-2006 01:53PM
    #1
    Registered Users, Registered Users 2 Posts: 9,845 ✭✭✭


    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,845 ✭✭✭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,845 ✭✭✭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,845 ✭✭✭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