This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 194321 - Message encoding not converted when ENOMEM error
Message encoding not converted when ENOMEM error
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks: 176344 198868
  Show dependency treegraph
 
Reported: 2006-06-07 05:57 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0210
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-01 19:00:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2006-06-07 05:57:18 EDT
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
Comment 4 RHEL Product and Program Management 2006-08-18 11:38:51 EDT
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.
Comment 10 Red Hat Bugzilla 2007-05-01 19:00:44 EDT
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

Note You need to log in before you can comment on or make changes to this bug.