[Gambas-user] Serial comunication
Paolo Saudin
sdnpaolo at ...69...
Thu Jul 15 15:17:31 CEST 2004
Hi everybody,
here's my problem: I need to get data from a serial device but I
receive some strange characters in the incoming buffer instead of what I
would expect.
The charset in use is 'ANSI_X3.4-1968' and I tried to convert it to ISO
format as follow
DIM s as String
s = Conv$(buffer, System.Charset, "ISO-8859-1") being buffer the string
I get from the serial port, but I get a 'Bad string convertion' error.
I tried both PRINT Conv$(Chr$(191), "UTF-8", "ISO-8859-1"), PRINT
Conv$(Chr$(191), System.Charset, "ISO-8859-1") but I get the same error
Here what I should receive : '>+00.001' . In curly brackets the Asc code
for each character
vb6:
>{62} +{43} 0{48} 0{48} .{46} 0{48} 0{48} 1{49}
carriage return{13}
Gambas: ? stand for those strange chars
?{191} ?{101} ?{204} ?{152} .{46} 0{48} 0{48} 1{49}
carriage return{13}
The second part on is correct. Any help?
Thanks very much!
- Paolo
More information about the User
mailing list