Boost logo

Boost Users :

Subject: [Boost-users] Why does boost::locale::generator fail for some locale codes?
From: Gallaecio (adriyetichaves_at_[hidden])
Date: 2012-05-15 10:28:10


I am using boost::locale::generator with its default backend (ICU I assume) to
generate an std::locale. But for some reason, when I pass certain locale codes
to the generator, it fails and the application execution is interrupted with
the following output messages:

    terminate called after throwing an instance of
'boost::locale::conv::conversion_error'
      what(): Conversion failed
    Abortado

I have tested the following values:

* gl — FAILS
* gl_ES — FAILS
* gl_ES.utf8 — Works
* en — Works
* en_US — Works
* en_US.utf8 — Works

Installed locales should not be the issue:

    [user_at_localhost build]$ locale -a
    C
    en_US
    en_US.iso88591
    en_US.utf8
    galego
    galician
    gl_ES
    gl_ES_at_euro
    gl_ES.iso88591
    gl_ES.iso885915_at_euro
    gl_ES.utf8
    POSIX

So why might this be happening?



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net