[illumos-Discuss] strange error
Garrett D'Amore
garrett at damore.org
Thu Jun 30 08:11:46 PDT 2011
On Mon, 2011-06-27 at 01:46 -0700, Apostolos Syropoulos wrote:
> > Is the locale in question actually installed?
> >
> > pkg install pkg:/locale/en
> >
> > Try it.
>
> Well the locale is installed:
THe directories being present is not sure. The old locale packages and
the new ones are different and its easy to confuse the two.
Please do a find and look for files called LCL_DATA. :-) Or better yet,
just try to reinstall the package.
- Garrett
>
>
> $ ls -l /usr/lib/locale/el_GR.UTF-8/
> total 5395
> drwxr-xr-x 2 root bin 4 2011-01-27 08:52 amd64
> -r-xr-xr-x 1 root bin 5458852 2010-12-16 12:05 el_GR.UTF-8.so.3
> drwxr-xr-x 2 root bin 2 2010-12-16 12:04 LC_COLLATE
> drwxr-xr-x 3 root bin 6 2011-01-27 08:52 LC_CTYPE
> drwxr-xr-x 2 root bin 4 2011-01-27 08:52 LC_MESSAGES
> drwxr-xr-x 2 root bin 2 2010-12-16 12:04 LC_MONETARY
> drwxr-xr-x 2 root bin 2 2010-12-16 12:04 LC_NUMERIC
> drwxr-xr-x 2 root bin 2 2010-12-16 12:04 LC_TIME
> drwxr-xr-x 3 root bin 4 2011-01-27 08:52 LO_LTYPE
> -rw-r--r-- 1 root bin 22 2010-12-16 12:05 locale_description
> -rw-r--r-- 1 root bin 17 2010-12-16 12:05 locale_map
> lrwxrwxrwx 1 root root 30 2011-01-27 08:52 methods_unicode.so.3 -> ../common/methods_unicode.so.3
> $ locale
>
> LANG=el_GR.UTF-8
> LC_CTYPE="el_GR.UTF-8"
> LC_NUMERIC="el_GR.UTF-8"
> LC_TIME="el_GR.UTF-8"
> LC_COLLATE="el_GR.UTF-8"
> LC_MONETARY="el_GR.UTF-8"
> LC_MESSAGES="el_GR.UTF-8"
> LC_ALL=
>
>
> Now by modifying the program as follows
>
>
> #include <iostream>
> #include <fstream>
> #include <string>
> using namespace std;
> int main() {
> wstring ws2 = L"Euro:\x20ac";
> wofstream out("unicode.txt");
> // out.imbue(locale("el_GR.UTF-8"));
> out << ws2<< endl;
> wcout << ws2;
> }
>
>
> it prints the word Euro on screen but nothing appears on the output file.
>
>
> A.S.
>
> ----------------------
> Apostolos Syropoulos
> Xanthi, Greece
>
More information about the Discuss
mailing list