Fixes to allow cross correct encoding on both codeblocsk / mingw and VS

All of this multi-byte encoding stuff is a bit complex -- it depends on how you compile your code.

I found that the original solution worked in codeblocks / ming32, but didn't work in a visual studio project that was set to use Unicode (rather than multi-byte).

Various stackoverflow sources recommend not using the `TCHAR` and just assuming `wchar_t` but for a library like this it seems to be a flexible way to go.

Currently the assumption is that the `PortInfo` data structure will always contain utf8 encoded strings.
Ok, well lets update it or remove it then.