dlerror (and probably strerror) will not convert the messages from their original encoding to the current locale's encoding. This causes EUC-JP messages to appear when in ja_JP.UTF-8 encoding for example. 2 ways to work around this problem: - say that UTF-8 is the default encoding on RHEL4, and convert all the .po files from their original encodings to UTF-8 (fairly straight forward, I already tested this with ja_JP) - fallback to C locale when the conversion fails, rather than passing non-UTF-8 encoded text back to the program Test case: #include <stdio.h> #include <string.h> #include <locale.h> main() { char *msg; setlocale(LC_ALL, ""); msg = strerror(1);/*EPERM*/ puts(msg); } And the gdb script to replicate the memory allocation error: set height 0 set environment LANG=ja_JP.UTF-8 echo --- Success case ---\n echo Japanese error message is readable in UTF-8 environment\n run break malloc.c:3594 command return 0 cont end echo --- Failure case ---\n echo Japanese error message is not readable in UTF-8 environment\n run quit
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0210.html