Persian text box to hex to byte

hi I have some text boxes which user enters information such as first name,last name ,... . I need to convert text boxes' text to hex and then convert the hex to bytes and send to device via rs232.

I know the sending via rs232 part and I also know how to convert text to bytes.

My problem is ,now, I should work with Persian characters in text boxes .It means the text for name in text box would for example like this "حسین".

How can I solve my problem?


If i understand correctly you can try something like that

  byte[] yourStrBytes = Encoding.GetEncoding("your encoding").GetBytes("your str");
  string hexStr = BitConverter.ToString(yourStrBytes).Replace("-", "");
  byte[] hexStrBytes=Encoding.UTF8.GetBytes(hexStr);

Need Your Help

Eclipse debug settings

php eclipse debugging zend-framework xampp

I have downloaded Eclipse PDT 3.0.x All In One and Running XAMPP on Windows 7. How to configure eclipse to enable PHP debugging(zend or xdebug) within eclipse.