My Classic ASP application retrieves an UTF-8 string from it's database, but I need to convert it to ISO-8859-1. I can't change the HTML page encoding;
I really need to convert just the fetched string. How can I do it?
My Classic ASP application retrieves an UTF-8 string from it's database, but I need to convert it to ISO-8859-1. I can't change the HTML page encoding;
I really need to convert just the fetched string. How can I do it?
To expand on the OP's own self-answer, when converting from single-byte character sets (such as
ISO-8859-1
,Windows-1251
,Windows-1252
, etc...) toUTF-8
, there is some needless redundancy in converting to and back fromADODB
's byte array. The overhead of multiple function calls and conversions can be eliminated as such:I found the answer here:
So I just did this:
And it worked nicely.