Question : Caracters not displaying correctly in controls.

Hi Experts,

Controls on my VB.Net Win app. are not displaying characters correctly. For example the ΓΌ character is displayed as a ?, this is happening with comboBoxes and DataGrids.

Answer : Caracters not displaying correctly in controls.

It is an encoding problem.

If you are reading the file with a stream reader then displaying on screen, try playing around with the encoding that the Stream Reader uses.

e.g.

Dim reader As New System.IO.StreamReader("c:\temp.txt", System.Text.Encoding.Default)

You can try different encodings but the default as shown above is a good place to start.
Random Solutions  
 
programming4us programming4us