develooper Front page | perl.perl5.porters | Postings from April 2018

Re: [perl #133157] Solaris Failing Some Locale Tests

Thread Previous | Thread Next
From:
Carlos Guevara
Date:
April 28, 2018 03:57
Subject:
Re: [perl #133157] Solaris Failing Some Locale Tests
Message ID:
CAASMjLERTpkL+Zh9eo2OqHKPnSWc3T+vLW7hi9mR9nCy=1DVGA@mail.gmail.com
Revised radix.c:
#####
#include <stdio.h>
#include <locale.h>

int
main(int argc, char ** argv)
{
    unsigned char buf[100];
    unsigned int i;

    printf("%s\n", setlocale(LC_ALL, "ar_AE.UTF-8"));
    snprintf(buf, sizeof(buf), "%g", 3.2);

    for (i = 0; i < sizeof(buf); i++) {
        if (buf[i] == '\0') break;
        printf(" %x", buf[i]);
    }
    printf("\n");
}
#####

Output:
#####
ar_AE.UTF-8
 33 d9 32
#####

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About