title: Code Returns Unicode characters How to Convert to ASCII
body: <p>Imports Microsoft.VisualBasic</p>
  
  <pre><code>Public Class VigenereCipher
  
      Public Shared Function Encrypt(ByVal cipherTxt As String, ByVal key As String)
          Dim encryptedText As String = ""
          For i As Integer = 1 To cipherTxt.Length
              Dim temp As Integer = Asc(GetChar(cipherTxt, i)) _
                                    + Asc(GetChar(key, i Mod key.Length + 1))
              encryptedText += Chr(temp)
          Next
          Return encryptedText
      End Function
  
      Public Shared Function Decrypt(ByVal cipherTxt As String, ByVal key As String)
          Dim decryptedText As String = ""
          For i As Integer = 1 To cipherTxt.Length
              Dim temp As Integer = Asc(GetChar(cipherTxt, i)) _
                                    - Asc(GetChar(key, i Mod key.Length + 1))
              decryptedText += Chr(temp)
          Next
          Return decryptedText
      End Function
  
  End Class
  </code></pre>
  
  <p>I would want the program to return regular characters because it outputs unicode characters.</p>