Re: VBA Excel Macro write file using UTF-8 encoding
I know of nothing in Excel VBA that can do that and didn't find a Win32 API function for that either. However, actually UTF-8 isn't really so complicated. You can use StrConv() to first convert to UTF-16 and from there do the conversion to UTF-8 yourself. AFAICT Windows doesn't use any Unicode characters beyond the Basic Multilingual Plane anyway, which allows you to simply take the byte pairs from the UTF-16 encoding for Unicode codepoints, simpifying things a bit more.
Eventually, looks like it's a matter of how much effort you want to take for the UTF-8 output.
HTH
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Bookmarks