Displaying other language characters

This is a discussion on Displaying other language characters within the C++ Programming forums, part of the General Programming Boards category; Sir, I have just learnt to write Hello world programme.I want to greet people in my own mother tongue (Tamil ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    4

    Displaying other language characters

    Sir,
    I have just learnt to write Hello world programme.I want to greet people in my own mother tongue (Tamil of india) via my programme.Tell me how to display unicode fonts of tamil in my programme.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,848
    Does your OS / Compiler support unicode?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    4
    yes.I used to type docs in unicode only.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Something like this:
    Code:
    int main()
    {
        wprintf(L"Hello, world\n");
        return 0;
    }
    Obviously, you'd have to replace the english words with tamil ones - I don't know what that would be, but the above code should work for ANY language.

    Of course, the other question is if your text-editor that you use for producing the source file supports unicode - that I can not say. Nor if the C-library that comes with your compiler actually implements wprintf().

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    4
    I dont understand what you have said.The code is not working in my compiler.

  6. #6
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    What compiler do you use? What are the errors that are displayed?
    Don't rush with printing in your own language, learn the basics at least first.
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. displaying hex characters
    By pastitprogram in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 03:18 PM
  2. How do you check how many characters a user has entered?
    By engstudent363 in forum C Programming
    Replies: 5
    Last Post: 04-08-2008, 07:05 AM
  3. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  4. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 02:11 PM
  5. Enough language discussions.
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 06-13-2004, 10:59 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21