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

c# currency

  • 03-12-2011 5:03pm
    #1
    Registered Users, Registered Users 2 Posts: 4,200 ✭✭✭


    im sure there is a simple solution to this but when i use currency format i get a ? how do i change it to the euro symbol. using a consloe application if that makes a difference.


Comments

  • Registered Users, Registered Users 2 Posts: 1,306 ✭✭✭carveone


    im sure there is a simple solution to this but when i use currency format i get a ? how do i change it to the euro symbol. using a consloe application if that makes a difference.

    The console app might well make a difference - it used to in the past because GUI apps used Unicode and console used codepages. I'm not so sure about the situation now though.

    My guess is if you find out the proper value for the euro in the codepage you are using (probably 0x80 or decimal 128, as opposed to the proper unicode which is U+20AC) you should get something...

    There's definately a right way of doing it - ie: not using printf or whatever is the equivalent in C# - and I can't quite remember what it is...


  • Registered Users, Registered Users 2 Posts: 1,306 ✭✭✭carveone


    Essentially what I am saying is that standard I/O streams are, well, broken. But the console itself is definately UTF-16 capable. You just need to use the right calls..

    Edit:
    Which appear to be WriteFile... Microsoft's Kaplan has a blog about this stuff, it was in my bookmarks (which is why I couldn't find it ;) ):

    http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx
    http://blogs.msdn.com/b/michkap/archive/2010/04/07/9989346.aspx

    Hope this helps...


Advertisement