CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    54

    Whether 0xFFFF is a valid Unicode character?

    Hi,

    I just wonder whether 0xFFFF is a valid Unicode character.

    When I using the following code:

    CStringW strTempW;
    CString strTemp1;
    INT_PTR nLen;

    strTempW.Format(L"%c", 0xFFFF);
    nLen = strTempW.GetLength();

    strTemp1 += strTempW;
    nLen = strTemp1.GetLength();

    After executing the first codeline strTempW.Format(L”%c”, 0xFFFF), I will get strTempW of length 1, but cannot see it first character in Visual Studio watch window.

    After executing the codelilne strTemp1 += strTempW, I will get strTemp1 of length 0.

    That is confusing to me. Whether 0xFFFF is taken as a valid Unicode or not?

    Thanks

  2. #2
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,641

    Re: Whether 0xFFFF is a valid Unicode character?

    Nobody cares how it works as long as it works

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured