Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

Convert a string to UTF-16

, 29 Mar 2010
Rate this:
Please Sign up or sign in to vote.
Same function and little bit easier:Imports System.Runtime.Remoting.Metadata.W3cXsd2001Class Converter Public Shared Function ConvertToUTF16(ByVal str As String) As String Return New SoapHexBinary(System.Text.Encoding.BigEndianUnicode.GetBytes(str)).ToString End...
Same function and little bit easier:
 
Imports System.Runtime.Remoting.Metadata.W3cXsd2001
 
Class Converter
    Public Shared Function ConvertToUTF16(ByVal str As String) As String
        Return New SoapHexBinary(System.Text.Encoding.BigEndianUnicode.GetBytes(str)).ToString
    End Function
End Class

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Daniel Leykauf
Business Analyst
Austria Austria
I am working as Business Analyst and Development Specialist for an international bank since 1993.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 29 Mar 2010
Article Copyright 2010 by Daniel Leykauf
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid