DBCS support
PowerBuilder 8 supports both ANSI and double-byte character sets (DBCS). Any applications that you build in or migrate to PowerBuilder 8 can run in a Windows DBCS environment. If you plan to deploy an application to both DBCS and ANSI environments, make sure the size of controls is large enough to accommodate all character sets that might be used.
Usage
In an ANSI environment, a character is equivalent to a byte. However, in a DBCS environment, byte and character are not equivalent梕ach character could be one or two bytes. For example, in the edit mask style xxxx, x always represents a character. The mask can hold four bytes in ANSI, and eight bytes in DBCS. You must allocate enough memory space to handle this difference. For example, you may need to change the width of a column of data type char from 40 to 80.
LenW function In DBCS environments, you should use the "wide" version of the Len function, Lenw, to obtain the number of characters in a string. The Len function obtains the number of bytes in the string.
PowerBuilder determines whether to call ANSI or multibyte versions of functions based on the current Windows environment. For example, in a DBCS Windows environment such as Chinese Windows, multibyte functions are called. Using multibyte functions adds to processing time. However, if you only require ASCII data processing, you can force ANSI operations in a DBCS Windows environment with the command-line option /ANSI.
DBCS support
PowerBuilder 8 supports both ANSI and double-byte character sets (DBCS). Any applications that you build in or migrate to PowerBuilder 8 can run in a Windows DBCS environment. If you plan to deploy an application to both DBCS and ANSI environments, make sure the size of controls is large enough to accommodate all character sets that might be used.
Usage
In an ANSI environment, a character is equivalent to a byte. However, in a DBCS environment, byte and character are not equivalent梕ach character could be one or two bytes. For example, in the edit mask style xxxx, x always represents a character. The mask can hold four bytes in ANSI, and eight bytes in DBCS. You must allocate enough memory space to handle this difference. For example, you may need to change the width of a column of data type char from 40 to 80.
LenW function In DBCS environments, you should use the "wide" version of the Len function, Lenw, to obtain the number of characters in a string. The Len function obtains the number of bytes in the string.
PowerBuilder determines whether to call ANSI or multibyte versions of functions based on the current Windows environment. For example, in a DBCS Windows environment such as Chinese Windows, multibyte functions are called. Using multibyte functions adds to processing time. However, if you only require ASCII data processing, you can force ANSI operations in a DBCS Windows environment with the command-line option /ANSI.