Or! To be more specific! All works fine, except the Swedish characters!! Me being an international dude find this quite important!
How to find the solution!?
There are so many places to change the CHARSET that I am simply out of ideas!
(When INSERTING data, when reading data, when showing data, in Xojo…)
EncodeURLComponent and DecodeURLComponent aren’t related to text encodings. Use DefineEncoding to specify the encoding of a string and ConvertEncoding to change the encoding.
Thank you!
Oh, I think these encoding-issues are difficult! Different languages, different software, different environments…!
It will be VERY interesting to see if these things also work when using Mac and Linux!! Time will tell!!
But I can tell from this point of view, it’s a potential trap-door…!
Can I please ask you, users around the world, to create a new project, paste the code in a button and send the screen to me or paste in the thread? Do you see different than above? Or the same?
DIM http as New HTTPSocket
http.Yield = TRUE
DIM strPage As String = http.Get("http://vadstenakonstrunda.se/users.asp" , 30)
strPage = DefineEncoding(strPage, Encodings.UTF8 )
MsgBox strPage
If you have Windows, two generations old* and the Swedish operating system you need not to compile the code…
It works!
But I know, there are some people out there with a different set up!
*) I don’t know what Windows version as I have. It’s not ten, not the previous but the version before the previous…
The definition of the encoding usually is in the header part of the html. If you only parse one page then UTF8 is okay. If you want to parse more pages you need to evaluate the header.
Well.
Thank you!
I don’t parse HTML in such sense.
I load text from Internet. If you paste the URL you will see the text… It’s not a secret! Not in such sense!
But later, when posting, I think I need to use HTML headers to get all information correct…
It’s really strange that I run into this error now and not earlier, because I’ve been fiddling with this for quite some time.
Maybe it was similar but not the same!? Or, I did not check for Swedish characters close enough…?
It’s a different thing.
TextType is used within Xojo, for the database, right!?
(Thank you for reminding me, however!!)
“Different software” in this sense refers to Access and Classic ASP to read and write data to that database, using my Xojo project as the User Interface…
Later to be replaced by SQL Server and dot net, I assume!
On top of this comes DreamWeaver to do all the coding for web.
So… Different software means other software than Xojo, still within the Xojo project!
[quote=214709:@Jakob Krabbe]It’s a different thing.
TextType is used within Xojo, for the database, right!?
(Thank you for reminding me, however!!)
“Different software” in this sense refers to Access and Classic ASP to read and write data to that database, using my Xojo project as the User Interface…
Later to be replaced by SQL Server and dot net, I assume!
On top of this comes DreamWeaver to do all the coding for web.
So… Different software means other software than Xojo, still within the Xojo project! :-)[/quote]