new Windows version available

Are there new versions/documentation?

new Windows version available

Postby berndnoetscher » Thu Mar 20, 2008 1:13 pm

It comes with bug fixes and some new features and unicode support.

KBasic comes with two string types.

* String (Unicode support, internally it is a native QString from Qt. UTF8 is used to store the data)
* CString (Local 8 Bit support ASCII, this is a native C string used as in C/C++)

If a function accepts several string expressions and the first string expression is of type String (Unicode), all other expressions of type CString are converted to unicode using the local 8 bit character set automatically.

Reading and writing strings. If you use the String data type, the string data is encoded as UTF8 (like the KBasic’s source codes within KBasic’s IDE). But if you use CString, the data is treated as local 8 bit ASCII, which is useful for compatibility reasons to make old code working.

It is possible to use UTF16 for Windows API calls. To do so, use a CString and the function UTF16 to convert from String to CString.

If a Framework class method uses a String datatype it is actually internally Unicode QString, not a 8 Byte CString.

See also http://www.kbasic.com/doku.php?id=lrbuiltins#utf8
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Return to Announcements

cron