[Gambas-user] String conversion for printing

Charlie charlie at ...2793...
Thu Feb 18 16:22:06 CET 2016


I don't know all the answers to this but If you run the following code it may
help you diagnose the problem: -
Public Sub Form_Open()
Dim siCount As Short
Print "Length of string = " & Len("é")
For siCount = 1 To 2
  Print "Character " & Str(siCount) & " - " & Asc(Mid("é", siCount, 1))
Next
Print "The UTF-8 Code for 'é' = " & String.Code("é")
End 
The output I get is:- 
Length of string = 2
Character 1 - 195
Character 2 - 169
The UTF-8 Code for 'é' = 233
The ASCII characters for é are 195 and 169See 
http://www.w3schools.com/charsets/ref_utf_latin1_supplement.asp
<http://www.w3schools.com/charsets/ref_utf_latin1_supplement.asp>   for
UTF-8 tables



--
View this message in context: http://gambas.8142.n7.nabble.com/String-conversion-for-printing-tp55489p55492.html
Sent from the gambas-user mailing list archive at Nabble.com.


More information about the User mailing list