Double-byte characters
VA Smalltalk provides Smalltalk methods to convert from single-byte strings to double-byte strings. Usually, you do not have to concern yourself with double-byte strings, because VA Smalltalk does the conversion automatically when it is required.
If your application supports double-byte strings, use the DBString class, or a similar double-byte string class, whenever you work with string variables. Then, when you request something in string format (asString), VA Smalltalk will return either a single-byte string or a double-byte string, depending on the country setting for your workstation. To see what class is appropriate for your workstation's setting, Display Locale new preferredStringClass.
To convert between single- and double-byte strings, use the following messages:
• To convert double-byte strings to single-byte strings, send the asSBString message to the string. This message will return a single-byte string, if possible. If the receiver includes double-byte characters, the message returns nil.
• To convert single-byte strings to double-byte strings, send the asDBString message to the string.
Last modified date: 01/29/2015