bugGNU gettext - Bugs: bug #42601, gettext doesn't work on AIX

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #42601: gettext doesn't work on AIX

Submitted by:  Roger <wzis>
Submitted on:  Mon 23 Jun 2014 10:50:25 AM UTC  
Votes:  10  
 
Category: End-user / runtimeSeverity: 3 - Normal
Item Group: NoneStatus: Not a Bug
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Tue 24 Jun 2014 07:56:10 PM UTC, comment #1:

Daiki found that this is caused by zh_CN locale not installed on AIX. After adding that locale, the issue disappear. Case can be closed.

Roger <wzis>
Mon 23 Jun 2014 10:50:25 AM UTC, original submission:

I downloaded gettext 0.19.1 and libiconv 1.14 source tar balls, and compile/install them on AIX 5.3, and did a test using zh_CN.utf8 locale by a very simple C program, but found it not working (I did a test on AIX 7.1 using the gettext command before and that one failed, so that's why I tried to build from latest source codes, but found it still not working).
After adding a number of fprintf in the codes, what I found is the issue is in this part:
in gettext-runtime/dcigettext.c
It's the following block caused the AIX gettext not working:
------------------------------------------------------------
# ifndef IN_LIBGLOCALE
const char *encoding = get_output_charset (domainbinding);
# endif
------------------------------------------------------------
the encoding got is ISO-8859-1, should be UTF-8

The following is the .po file:

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-15 08:38+1000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: intl.c:10
msgid "Try this"
msgstr "试一下这个"

The test C program is this:

#include <stdio.h>
#include <libintl.h>
#include <locale.h>

int main(int ac, char *av[])
{
setlocale(LC_ALL, "");
textdomain("wzisintl");

printf("%s\n", gettext("Try this"));
}

Thanks and Best Regards

Roger <wzis>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by ueno (Updated the item)
  • -unavailable- added by wzis (Voted in favor of this item)
  • -unavailable- added by wzis (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 10 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 11:52:58 AM UTChaibleCategoryNone=>End-user / runtime
      Assigned toNone=>ueno
    Wed 25 Jun 2014 02:09:11 AM UTCuenoStatusNone=>Not a Bug
      Open/ClosedOpen=>Closed
    Tue 24 Jun 2014 07:58:42 PM UTCwzisCarbon-Copy-=>Added wzis

    Back to the top


    Powered by Savane 3.1-cleanup1