[gtkmm] Glib::Dir exception and localization



Hello

When Glib::Dir is created, it tries to open its string argument as a 
directory. If it fails it throws a Glib::FileError exception.

But I have found that if I call before

setlocale(LC_MESSAGES,"");

Glib::Dir doesn't throw  Glib::FileError anymore.

Is this a bug or there is something I dont understand?

Example code:

#include <glibmm/fileutils.h>
#include <iostream>
 
int main(int argc,char **argv){
   
  setlocale(LC_MESSAGES,"");
try{
   Glib::Dir dir("/Hola");
}
catch(const Glib::FileError& fe){
   std::cerr<<fe.what()<<std::endl;
}
  return 0;
}





-- 
 <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
                 Sergio Pascual Ramírez       spr astrax fis ucm es
               Tf: (+34)  91-394-50-18      Fax: (+34)  91-394-46-35
                      Dept. Astrofísica Facultad de C.C. Físicas 
                          Universidad Complutense de Madrid
                                 28040 Madrid (Spain)
 ------------------------------------------------------------------------------
        - Yo también quiero una Europa libre de Patentes de Software -
        --------------------------------------------------------------
        EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es 
        --------------------------------------------------------------
 <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]