Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

StrByCharset – PB Docs 2019 – PowerBuilder Library

StrByCharset – PB Docs 2019

StrByCharset

database parameter

Description

Specifies how to convert string data between PowerBuilder Unicode
strings and multibyte strings on the client.

Applies to

I10 Informix

O90 Oracle9i

O10 Oracle 10g

ORA Oracle (for 11g and later)

Syntax

Parameter

Description

value

Specifies how to convert string data between
PowerBuilder Unicode strings and multibyte strings on the
client. Values are:

  • 0

    String conversion is based on the current OS code
    page, or, for UTF-8 code sets on Informix, on the UTF-8
    code set.

  • 1

    For Informix, string conversion is based on the code
    set specified in the Client_Locale database parameter. For
    Oracle, string conversion is based on the Oracle character
    set specified in the NLS_Charset database
    parameter.

Default value

StrByCharset=0

Usage

Informix

The StrByCharset DBParm specifies how to convert string data
between PowerBuilder Unicode strings and Informix client multibyte
strings. By default, string conversion for UTF-8 code sets is based on
the UTF-8 code set, and string conversion for non-UTF-8 code sets is
based on the current OS code page. If StrByCharset is set to 1 (true),
string conversion is based on the code set specified in the DBParm
Client_Locale.

Example 1

With these settings:

The Informix client and server character sets match, so all string
data from the client can be sent to the server and fetched back
directly, even if some characters do not belong to the EN_US.8859-1
character set but are within code page 1252, because no string
conversion happens between the Oracle client and server. All string data
can be displayed using the OS code page. If StrByCharset is set to 1,
when string data is converted between the Informix client (ANSI) and
PowerBuilder (Unicode), characters that are not in the EN_US.8859-1
character set are not converted correctly.

Example 2

With these settings:

The client and server character sets match. All string data,
including Korean characters, are sent or received one byte at a time so
no data is lost. Using the Korean OS code page, all Korean string data
can be converted from ANSI to Unicode safely with StrByCharset set to
0.

Example 3

With these settings:

Because characters in the ZH_TW.BIG5 character set do not belong
to code page 1252, string data conversion must be based on the
ZH_TW.BIG5 character set.

Oracle

The StrByCharset DBParm specifies how to convert string data
between PowerBuilder Unicode and OCI client multibyte strings. By
default, string conversion is based on the current OS code page or an
Oracle character set. The StrByCharset database parameter is ignored if
NLS_Charset is set to Unicode because both PowerBuilder and the OCI
client use the UTF-16 format. When NLS_Charset is set to another value,
you must set StrByCharset to 1 if the character set on the client is
incompatible with the OS code page.

Example 1

With these settings:

The Oracle client and server character sets match, so all string
data from the client can be sent to the server and fetched back
directly, even if some characters do not belong to the WE8ISO8859P1
character set but are within code page 1252, because no string
conversion happens between the Oracle client and server. All string data
can be displayed using the OS code page. If StrByCharset is set to 1,
when string data is converted between the OCI client (ANSI) and
PowerBuilder (Unicode), characters that are not in the
WE8ISO8859P1character set are not converted correctly.

Example 2

With these settings:

The client and server character sets match. All string data,
including Korean characters, is sent or received one byte at a time so
no data is lost. Using the Korean OS code page, all Korean string data
can be converted from ANSI to Unicode safely with StrByCharset set to
0.

Example 3

With these settings:

Because characters in the ZHT16BIG5 character set do not belong to
code page 1252, string data conversion must be based on the ZHT16BIG5
character set.

Examples

To specify that the Informix client should use the fr_FR.8859-1
character set defined by the Client_Locale parameter to handle string
datatypes:

  • Database profile

    Specify fr_FR.8859-1 in the Client Locale box and select the
    String Conversion Based on Client Locale box on the Regional
    Settings page in the Database Profile Setup dialog box.

  • Application

    Type the following in code:

To specify that the OCI client should use the character set
defined by the NLS_LANG parameter on the local computer to handle string
datatypes:

  • Database profile

    Select Local from the NLS Charset drop-down list and select
    the Use String Conversion Based on Oracle Character Set box on the
    System page in the Database Profile Setup dialog box.

  • Application

    Type the following in code:

See also

Client_Locale

Db_Locale

NLS_Charset


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x