Thread: Problem with Locales (hu)!

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    30

    Problem with Locales (hu)!

    Hello Everbody!

    I need to write a function to read in chars from a string and I have to find out if those chars are alphanumeric.

    However this program is not English, it's in Hungarian and that's the problem.

    Functions such as islower(), isupper(), isalpha..etc don't recognize special hungarian (e.g: Á,É,Ú,Ó..etc) characters as letters.

    I tried to change the loacle using setlocale(LC_CTYPE,"hu") and setlocale(LC_ALL,"hu"), but it's not much help. Now some of the characters are OK, but not all of them. Letters like 'Ú' or 'Á' are still non-alphanumeric...

    How can I solve this? Any suggestions would be appreciated. Please help me out guys.

    P.S.: I also gave a try to the LANG enviroment variable, but I don't exactly know how to use it.. I've typed in something like:

    # define LANG hu or # define LANG Hungarian

    Have no luck...- Is the syntax correct?

    Thanks in advance!
    Best Regards,

    Bill

  2. #2
    Green Member Cshot's Avatar
    Join Date
    Jun 2002
    Posts
    892
    Check for you special character sets first. Then if they're not special hungarian characters, you can then use your islower(), isupper(), isalpha()... functions.
    Try not.
    Do or do not.
    There is no try.

    - Master Yoda

  3. #3
    Registered User
    Join Date
    Aug 2002
    Posts
    30

    Wink

    Hello Salem and Master Yoda!

    I'm using Windows XP (Hungarian version), and Mingw/GCC compiler.

    As for the page you mentioned, unfortunately I never seen it. Sounds interesting, where can I find it??
    Best Regards,

    Bill

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    30
    Ok, thanks, I will check out the Mingw docs. I downloaded this with Dev-C++ package and as far as I know, there was only a help file (about the GNU Standard C Library).

    I have already checked out the help file, but there is no more info there.

    Anyway, I will visit the Mingw hp, thanks again!

    Bye!
    Best Regards,

    Bill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Problem with ctype and locales
    By cunnus88 in forum C++ Programming
    Replies: 8
    Last Post: 10-31-2007, 02:44 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM