The GNAT Reference Manual (8.6) specifies: `The default encoding method for the standard files, and for opened files for which no WCEM parameter is given in the FORM string matches the wide character encoding specified for the main program (the default being brackets encoding if no coding method was specified with -gnatW).'
However, if an empty FORM string is given to Open or Create, the WCEM is always set to brackets coding, regardless of the encoding method that has been specified with -gnatW: Set_WCEM (a-witeio.adb:1632): `if Start = 0 then File.WC_Method := WCEM_Brackets; else' from `gcc -v': `Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.3-2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu gcc version 4.4.3 (Debian 4.4.3-2)' -- Summary: Default WCEM for opened files is always WCEM_Brackets instead of the -gnatW-specified encoding Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mmarx at wh2 dot tu-dresden dot de GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43041