Cyclic time machine

The Unicode to ASCII conversion code was from seven years ago? Now the guy is more a manager than a programmer. He is a father and has some perspective. Rediscovering his work, applying it here, makes me wonder what ideas I will mine later. Digging into that barrel is bound to end with scraping it, right; the new ideas should come then.

It may be what those folks already know: as long as people use Excel, as long as Windows has cscript, VBA and Command Prompt, these things will live as long as the machines do. They’ll last through NT engine versions and trends. The only out is to solve it finally, forever: general data heuristics gleaning presentable meanings at the ease of fingertips.

ASP.NET has been open-sourced; the new IDE, version nearly-pro, is free. We have handhelds and portable printers. Change is surer to crash than to trickle.

Convert files to Unicode with VBA

I had a case where Unicode characters would show normally in Notepad, but opening them in Excel resulted in gibberish. I still wanted to use VBA because of automation via cscript. The FileSystemObject approach and the OpenText() subroutine failed to reproduce the Unicode characters. Instead, I used a combination of ADODB.Stream and brute conversion of each character to Unicode.

Set objStream = CreateObject("ADODB.Stream")
objStream.CharSet = "UTF-8"
objStream.Type = 2

strData = objStream.ReadText
strData = ITSlugFunction(strData)  ' see link below

strData = "<html>" & strData & "..."

' write string to C:\test.html

You can embed this into an Outlook mail message and get Unicode characters from the command-line. Yes, Outlook will automatically treat &#xx; characters as Unicode!