CString's MakeUpper issue
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: CString's MakeUpper issue

  1. #1
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    CString's MakeUpper issue

    I'm not sure if I brought this up before, if so I apologize.

    I'm using CString's MakeUpper() method to convert string to all upper case. This works for US letters as well as for some European languages, but for some reason that functions fails with some non-ANSI Unicode characters.

    Does anyone know why and if there's a reliable API to convert a Unicode-16 string to all upper case without going into details about locales, etc?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: CString's MakeUpper issue

    Define "fails"
    Victor Nijegorodov

  3. #3
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: CString's MakeUpper issue

    The thing is that I don't know.

    Let me explain. I use that function as part of generation of a user code for a license of my software. On the other hand a PHP script on a web server generates the same license code automatically in a user email. The PHP capping function works as intended, the issue happens in MakeUpper when certain "foreign" characters aren't converted to upper case. I don't have a non-English keyboard now to give you an example...

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,359

    Re: CString's MakeUpper issue

    Search bing for "CString makeupper fails on unicode" for a bit of background.

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: CString's MakeUpper issue

    Quote Originally Posted by ahmd View Post
    The thing is that I don't know.
    ...
    The PHP capping function works as intended, the issue happens in MakeUpper when certain "foreign" characters aren't converted to upper case. I don't have a non-English keyboard now to give you an example...
    So is it the same problem you asked (and then have answered) in this thread?
    Victor Nijegorodov

  6. #6
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: CString's MakeUpper issue

    Thanks. I'm still not sure if it fixes the issue though.... what do you use in your case?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center