Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String to unicode conversion ... 1

Status
Not open for further replies.

keithlages

IS-IT--Management
Feb 7, 2002
35
US
Can anyone elighten me as to the proper method for converting text accepted from an input box from a string to unicode?

This is what worked for VB6 but won't work for .NET

InputText = StrConv(InputText, vbUnicode)


Thanks for any help!

Keith
 
Keith -

No need - .NET is fully UTF-16 Unicode internally - strings, forms, everything. If you need to transfer that into UTF-8 (for sending through a HTTP POST or something), you can use the UTF8Encoding class from the framework.

VB6, BTW, was only Unicode UTF-16 in it's internals. Anything that got sent to a form was transformed into ANSI (yuck!). But you were OK writing to an ADO Command object, as long as your columns were NCHAR, NTEXT, etc.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Thanks Chip!

I thought I read something about that, I even noticed that there is no equivalent to StrConv in the Studio helps.

I'm trying to send input from a textbox to NetMessageBufferSend and it's just not working. I keep getting a malformed input error...

I'll keep at it though, thanks for the clarity!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top