Determine if a string is unicode

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tony Liu

    #1

    Determine if a string is unicode

    Hi, how to determine if a given string is unicode or not?

    Thanks
    Tony


  • Jon Skeet

    #2
    Re: Determine if a string is unicode

    Tony Liu <engineliu@hotm ail.com> wrote:[color=blue]
    > Hi, how to determine if a given string is unicode or not?[/color]

    All strings are unicode. Could you give more details about what you
    really mean?

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Jack Meyhoff

      #3
      Re: Determine if a string is unicode

      L"" is a unicode string, S"" is a .net string

      What is the difference here?



      "Jon Skeet" <skeet@pobox.co m> wrote in message
      news:MPG.19a6df cee6bbd2e98a315 @news.microsoft .com...[color=blue]
      > Tony Liu <engineliu@hotm ail.com> wrote:[color=green]
      > > Hi, how to determine if a given string is unicode or not?[/color]
      >
      > All strings are unicode. Could you give more details about what you
      > really mean?
      >
      > --
      > Jon Skeet - <skeet@pobox.co m>
      > http://www.pobox.com/~skeet/
      > If replying to the group, please do not mail me too[/color]


      Comment

      • Jon Skeet

        #4
        Re: Determine if a string is unicode

        Jack Meyhoff <postmaster@127 .0.0.9> wrote:[color=blue]
        > L"" is a unicode string, S"" is a .net string[/color]

        That looks like C++ to me, not C#.
        [color=blue]
        > What is the difference here?[/color]

        I suspect that actually, L"" is a unicode character pointer in C++, and
        S"" is a reference to a .NET String instance - but I don't know for
        sure.

        --
        Jon Skeet - <skeet@pobox.co m>
        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

        If replying to the group, please do not mail me too

        Comment

        • Tian Min Huang

          #5
          RE: Determine if a string is unicode

          Hi Tony,

          The String class in .NET (System.String) is unicode. Please refer to MSDN
          documentation:

          String Class
          http://msdn.microsoft.com/library/de...us/cpref/html/
          frlrfsystemstri ngclasstopic.as p

          Hope this helps.

          Regards,

          HuangTM
          Microsoft Online Partner Support
          MCSE/MCSD

          Get Secure! ¨C www.microsoft.com/security
          This posting is provided ¡°as is¡± with no warranties and confers no rights.


          Comment

          Working...