The Default encoding for Microsoft Winsock Control 6.0 in VB6 is Ansi

Thanks to the help of Microsoft official forums for developers, I managed to get the answer or here (for direct link to official documentation).

The default encoding for Microsoft Winsock Control 6.0 in VB6 is 'Ansi'.

This is important to know if you are converting from VB6 to VB.NET where you get to set the encoding to others and if your previous application is made with Winsock Control 6.0 (VB6), you had better set it as 'Ansi' (system.text.encoding.default), otherwise, your application may not work as it supposed to be. This is especially true if you are dealing with firmware.

To know the difference between Unicode and Ansi ? Check out here.

Unicode represents each char with 2 bytes while ANSI is 1 byte.

And doing socket in VB.NET is a pain compared to using Winsock Control 6.0 (VB6). You have to deal with lower level stuffs, but there are reasons for it. We will get to this in the coming posts.

In the mean time, the best sample codes that works best for socket VB.NET is this one. Alternatively, you can try out Chilkat socket which I have tested and works well. Check out the API documentation.

Comments

Early morning time, the mist is dim. Curved chi hair iron river bank, willow obviously elegant like smoke. Far does not see the mountain, nearly does not see the ship, only a little selects the lights, embellishes in the faintly recognizable mist. The young young schoolchild, sings in this mist at sunset; In a hurry the pedestrian, the chi hair irons moist hair clothing which fills by the mist. Most beautiful, when is in the fog the park, pavilion Taiwan pavilion, porch bridge park, fuzzy, partly visible. Let the human think that imitates, if places oneself in cheap chi flat iron unreal, is considering, is in the world, plays in the heavenly palace?