Today in Bergamo (20 Km near ISEO Lake) there are 30 celsisus, the humidity is 36% and does not wind blow…
And, as usual I’m crazy with XOJO …
This time for converting a string into a DOUBLE format …
The string or strings are normal temperature data taken by FLUKE Thermal Imaging.
I would like to view the thermography and save it to db mysql;
Anyway I think I can do it all, or I thought it was until this morning.
Instead, I can not convert a string into a double format.
Will it be for the heat ???
Or will it be a sorcery of the bad queen of “Once Upon A Time?”
Or maybe, is the string format to be problematic?
use format or str
format uses localized thousands and decimals
str uses “US” style
and the reverse are Cdbl and val
val wont use localized so str & val should be used together
cdbl will - so cdbl and format work together
Norman, I do exactly the opposite, I have a text file, and going to read the values that are formatted.
I try with double, cdbl, val but understand why I cannot convert a string containing a number in number… see the image at debug…
Have a look at the contents of vavalore in the debugger by clicking on the magnifying glass
Yes, are in UTF8 Format ( I think )
.8.3…1. in text
0038 0033 002E 0031 00 in hex
looks more like UTF16 BUT your DEFINE ENCODING says this is a single byte encoding (WindowsLatin1) and so interpretting this string of bytes stopped on the 00 (a non-ascii numeric character) and you get 0
Determining the right encoding to use will probably fix this
You really need to define it as the correct encoding
if you read this data from a file then I suspect that ConvertEncoding cant do the right things as before that line the encoding is nil
That’s what I’d expect
dim vavalore as string = mpixelrow(ro).colum(co)
BREAK // <<< and examine vavalore to see what encoding it is
I got a reason, in the end, the original program (FLUKE SmartView) was written with NET.Framework, likely the text file I can export with thermography temperatures in UTF16.
In fact, setting UTF16 now works.
So if all is well, I have three neurons, one is on vacation and the other two are on strike
Now is ok…
Going to play…
Massimiliano, looking at your files I’ve noted that they have the BOM at the beginning.
So they are encoded as UTF-16 LE