SetPerlReturnStringMode
Description
Specifies the return string mode for how Strings are to be returned for Perl hooks and scripts.
In the Local return string mode (CQ_RETURN_STRING_LOCAL), Strings being returned are first checked to ensure that they are in the local code page. If a String fails, an exception is thrown (caught with eval {} with the error in $@). Strings are always returned in the local code page.
In the Unicode return string mode (CQ_RETURN_STRING_UNICODE), no character checking on a String is performed. If the String being returned contains non-ASCII characters, it is returned in UTF8 format and not in the local code page.
Syntax
Perl
$clearQuestObj->SetPerlReturnStringMode(mode);
- Identifier
- Description
- clearquestObj
- A CQClearQuest object.
- mode
- A Long containing an Return string mode enumerated constant.
- Return value
- None.
Example
Perl
my $cq = CQClearQuest ::Build();
my $runmode = $cq->GetPerlReturnStringMode();
if ($wantLocal) {
$cq->SetPerlReturnStringMode($CQPerlExt::CQ_RETURN_STRING_LOCAL);
} else {
$cq->SetPerlReturnStringMode($CQPerlExt::CQ_RETURN_STRING_UNICODE);
}