Click or drag to resize

StrConv Function

X#
-- todo --
Converts character expressions between single-byte, double-byte, UNICODE, and locale-specific representations.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION StrConv(
	cExpression,
	nConversionSetting,
	nRegionalIdentifier,
	nRegionalIDType
) AS STRING CLIPPER
Request Example View Source

Parameters

cExpression (Optional)
Type: Usual
Specifies the character expression that STRCONV( ) converts.
nConversionSetting (Optional)
Type: Usual
Specifies the type of conversion. The table in the remarks section lists the values of nConversionSetting and the type of conversion performed.
nRegionalIdentifier (Optional)
Type: Usual
Specifies the Locale ID, code page, or FontCharSet value to use for the conversion. If nRegionalIDType is omitted, the Locale ID is used for the conversion. If nRegionalIdentifier is omitted, the system locale ID is used by default. If nRegionalIdentifier is invalid or not supported on the machine, the error "Invalid locale ID" is generated.
nRegionalIDType (Optional)
Type: Usual
Specifies if a Locale ID, code page, or FontCharSet is used for the conversion. The nRegionalIdentifier parameter, described above, is used to specify the actual Locale ID, code page,or FontCharSet used for the conversion.

Return Value

Type: String
Character data type. STRCONV( ) returns the converted character expression.
Remarks
nRegionalIdentifier Language
1029Czech
1031German
1033English (Default)
1034Spanish
1036French
1040Italian
1045Polish
1046Portuguese (Brazil)
2070Portuguese (Portugal)
nRegionalIDTypeDescription
0(Default) Specifies that the nRegionalIdentifier parameter is a Locale ID value.
1Specifies that nRegionalIdentifier is a code page value.
2Specifies that nRegionalIdentifier is a FontCharSet value.
X# disregards invalid characters or incorrect length in base 64- and hexBinary- encoded strings.
This function is useful for manipulating double-byte character sets for languages such as Hiragana and Katakana.
nConversionSettingConversion
1 Converts single-byte characters in cExpression to double-byte characters.
Supported for Locale ID only (specified with the nRegionalIdentifier or nRegionalIDType parameters).
2Converts double-byte characters in cExpression to single-byte characters.
3Converts double-byte Katakana characters in cExpression to double-byte Hiragana characters.
4Converts double-byte Hiragana characters in cExpression to double-byte Katakana characters.
5Converts double-byte characters to UNICODE (wide characters).
6Converts UNICODE (wide characters) to double-byte characters.
7Converts cExpression to locale-specific lowercase.
8Converts cExpression to locale-specific uppercase.
9Converts double-byte characters in cExpression to UTF-8
10Converts Unicode characters in cExpression to UTF-8
11Converts UTF-8 characters in cExpression to double-byte characters.
12Converts UTF-8 characters in cExpression to UNICODE characters.
13Converts single-byte characters in cExpression to encoded base64 binary.
14Converts base64 encoded data in cExpression to original unencoded data.
15Converts single-byte characters in cExpression to encoded hexBinary.
16Converts single-byte characters in cExpression to decoded hexBinary.
See Also