Troubleshooting
Problem
This technote explains how to resolve an error, "String returned from the CQPerl is not in the local code page". This can occur in IBM® Rational® ClearQuest®, when code pages are set incorrectly with regard to the local client workstation settings.
Symptom
When modifying a record with non-ASCII data on a ClearQuest 7.0 UNIX® machine, this error occurs:
Execution of a hook failed during the action Modify
FIELD_VALUE_CHANGED hook of the field Description, attached to
the Defect "LTST300001554". The reason for the failure was:
String returned from the CQPerl is not in the local code page,
"UNIX client". The string is "==== State: Submitted by: admin on 13 " (2976 characters in total).
: U+2122 at 182
Cause
When the code page has been set and changed to a non-ASCII code page such as 1252 MS Latin, this error can occur if the system locale is set to a non-UTF-8 such as ja_JP.eucJP or fr_FR.ISO8859-1.
As stated in the ClearQuest 7.0.x Information Center, ClearQuest supports non-ASCII data code pages on UNIX and Linux clients beginning with the ClearQuest 7.0 release.
Resolving The Problem
There are 2 possible solutions to resolve this issue:
1. Check the locale of the UNIX machine. The locale might be set to "LC_MESSAGES=C".
This can be verified by opening a command shell, and executing the following statement:
echo $LC_MESSAGES
To resolve this issue, set LC_MESSAGES to a UTF-8 (for example: en_US.UTF-8, ja_JP.UTF8), and subsequent modifications of the record with non-ACSII data should be successful. This can also be set using the command shell, though the methods differ depending on the shell you are running under.
For the C shell:
setenv LC_MESSAGES "<code_page_value>"
For the Bourne (bash) shell:
export LC_MESSAGES="<code_page_value>"
2. Set the return string mode for hooks and scripts to Unicode. Also check that the hook code is set to Unicode Aware.
Alternative:
In some cases, setting LC_ALL and LANG to en_US.UTF-8 resolves this issue.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21266293