Hi there, Im a newbie to C programming and am working my way through a great book but cant find a solution to my problem. Everytime I want to display a £ sign within a printf statement, I get a funny u with a dash above it. Can anyone please tell me how to get this to display correctly as a £ sign. Thanks Emma
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are using a UK keyboard with the £ on the Shift+3 key, then you may not have your locale set correctly. If you want UK settings generally; in Control Panel->Regional and Language Options->Advanced, set language not non-Unicode programs to United Kingdom and in Control Panel->Regional and Language Options->Languages->Details select Default Input Language = United Kingdom.
The problem is otherwise the £ in GUI fonts does notmap to teh same character code as in Console mode.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there, Im a newbie to C programming and am working my way through a great book but cant find a solution to my problem. Everytime I want to display a £ sign within a printf statement, I get a funny u with a dash above it. Can anyone please tell me how to get this to display correctly as a £ sign. Thanks Emma
I do believe printf("\234") should do the trick.
Yes, it worked!! Thank you so much. That had been driving me mad since I started!
If you are using a UK keyboard with the £ on the Shift+3 key, then you may not have your locale set correctly. If you want UK settings generally; in Control Panel->Regional and Language Options->Advanced, set language not non-Unicode programs to United Kingdom and in Control Panel->Regional and Language Options->Languages->Details select Default Input Language = United Kingdom.
The problem is otherwise the £ in GUI fonts does notmap to teh same character code as in Console mode.