Hi !
I've got some problem with downloading data (text) from internet. It's about those special chars we use in Sweden, like Å, Ä, Ö or å, ä and ö.
I use URLDownloadToFile or DownloadFile from a certain web site, that sometimes contain one or more of these chars. My downloads are then saved to a text file or similar according to this code:
URLDownloadToFile 0, "http://some website &format=XML ", "Textfile.txt", 0, 0
As long as the text remain in the file, then those mentioned chars are still the same and readable, but as soon as I extract the text out to strings for use in my program, the same chars are transformed to chinese letters in pair ! ("Västerås" becomes "VästerÃ¥s" for example !)
I understand that it's about coding in ANSI, Unicode and/or UTF-8. Looking at the "Textfile.txt" for 'Save as...', I found its setting always is UTF-8.
Well, then I resave it to ANSI, or Unicode then hope for the best. But next time I download again from the web, it's the same story: UTF-8 !
Probably VB6 is not able to read those chars into string from the UTF-8 coded file, and I can't find any method to recode them, or keep the file in an other code than UTF-8...
What can I do ?
/Kalle
I've got some problem with downloading data (text) from internet. It's about those special chars we use in Sweden, like Å, Ä, Ö or å, ä and ö.
I use URLDownloadToFile or DownloadFile from a certain web site, that sometimes contain one or more of these chars. My downloads are then saved to a text file or similar according to this code:
URLDownloadToFile 0, "http://some website &format=XML ", "Textfile.txt", 0, 0
As long as the text remain in the file, then those mentioned chars are still the same and readable, but as soon as I extract the text out to strings for use in my program, the same chars are transformed to chinese letters in pair ! ("Västerås" becomes "VästerÃ¥s" for example !)
I understand that it's about coding in ANSI, Unicode and/or UTF-8. Looking at the "Textfile.txt" for 'Save as...', I found its setting always is UTF-8.
Well, then I resave it to ANSI, or Unicode then hope for the best. But next time I download again from the web, it's the same story: UTF-8 !
Probably VB6 is not able to read those chars into string from the UTF-8 coded file, and I can't find any method to recode them, or keep the file in an other code than UTF-8...
What can I do ?
/Kalle