SUSE Support

Here When You Need Us

GB2312 encoded strings may have parsing errors without glibc-locale-base-32bit

This document (000021123) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 all service packs

Situation

Using libXm4-32bit to parse GB2312 (Simplified Chinese) encoded strings may result in the final character of the string being excluded.

Resolution

If 32bit packages are going to be used (including but not limited to libXm4-32bit), it is recommended to install the 32bit pattern:
zypper in patterns-base-32bit
Alternatively, a minimal solution to resolve this specific issue is to install glibc-locale-base-32bit:
zypper in glibc-locale-base-32bit

Cause

As of SLES 15, 32-bit support is not installed by default. Installing libXm4-32bit without glibc-locale-base-32bit leaves it unable to parse some string encodings, including GB2312.

Additional Information

The parsing error occurs in the function call mbtowc(), and an error code is returned. However, if a higher level function is used that makes an underlying call to mbtowc(), the error code may be discarded. This can be seen in calls to the function XrmGetResource(), which will return incorrect strings and not report an error.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021123
  • Creation Date: 28-Jun-2023
  • Modified Date:29-Jun-2023
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.