As you can expect I deal with a legacy web application which uses mainly Windows-1252 as charset.
I also coded a little library set, among them one which contains accents. Theses files are in UTF-8, and are included into legacy code. So here I am :
.------------. .-----------------. | UTF-8 | | Windows-1252 | |------------| |-----------------| | Dim str | <-------- inclusion -------- | Dim str2 | | str = "é" | | str2 = "è" | |____________| |_________________|
It sounds like str2
will be processed as if "è"
was encoded as UTF-8, although it's not the case.
I know that non-ASCII litterals should not be written in the code, but it's legacy. Moreover, I admit that I don't really want to downgrade convert UTF-8 files to Windows-1252. Also I'm looking for a clean way to tell the engine the right charset of string litterals before convert them to its internal representation. Response.Codepage
doesn' seems to be relevant or working. Is there a clean way other to solve this issue without turning new files into Windows-1252 charset ?