Page 1 of 1

Problem with character sets and .Net

Posted: November 2nd, 2007, 8:26 pm
by en3rgy
i decide to write a plugin for Smartie using vb.net when i use demo plugins i have a problem with non ascii characters (Cyrillic in my case)

Code: Select all

    Public Function function1(ByVal param1 As String, ByVal param2 As String) As String
       
        Return param1 

    End Function
i read about .net using only Unicode as strings and Smartie use ascii 8bit charset
so PC display show some garbage characters x2 because the unicode

i dont see way to make vb.net return needed string format :? and thinking it is impossible using string

is it possible function to return other type data instead of string ??? i try byte() dont work :(

Posted: November 2nd, 2007, 11:22 pm
by mattcro
I think this is what I tried doing a while ago in VB.NET with no luck. Have a look at the System.Text.Encoding class. I don't know if it can actually do what we need, though...