[Gambas-user] Serial comunication

Leo Barnhoorn leo.barnhoorn at ...246...
Thu Jul 15 18:39:24 CEST 2004


Hello Paolo,

You have too do it like this:

PRINT Conv$(Chr$(191), "ISO-8859-1", "UTF-8")

This gives no error.

Regards,
Leo.


On Thursday 15 July 2004 15:17, Paolo Saudin wrote:
> 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
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list