Thread: understanding setlocale()

  1. #1
    Unregistered
    Guest

    Unhappy understanding setlocale()

    I am interested in reading and writing japenese text in my C program .I used setlocale(LC_ALL,"ja").But it didn't work . Is there any other way by which we do this . I am using a HPUX machine with a GNU C compiler .I also changed the options-language to Unicode format in the intial desktop screen.Are there anyother overheads which I am missing .
    Thanks

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    Make sure that the second argument string is correct. Anything but "C" and "" are implementation-defined values for the second argument to setlocale. You can probably find the supported strings in your compiler's documentation.

    >Are there anyother overheads which I am missing
    There are always overheads when using Unicode because each character takes up twice as much space, but this would have little or no effect on your ability to use setlocale.

    -Prelude
    My best code is written with the delete key.

  3. #3
    Unregistered
    Guest

    Unhappy

    I checked on the locale -a result and I use bg_BG.iso88595 as the second argument now . But Setlocale returns a NULL pointer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Understanding Headers
    By AeonMoth in forum C++ Programming
    Replies: 2
    Last Post: 06-27-2007, 05:53 AM
  3. trouble understanding the source file structure
    By Mario F. in forum C++ Programming
    Replies: 5
    Last Post: 05-26-2006, 06:46 PM
  4. understanding recursive functions
    By houler in forum C Programming
    Replies: 7
    Last Post: 12-09-2004, 12:56 PM
  5. Help understanding conditional operator
    By Sereby in forum C Programming
    Replies: 7
    Last Post: 08-09-2004, 12:24 PM