Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Support for internationalization in 2015 Beta

Chris_G_2
Beginner
669 Views

Do I understand it correctly: the 2015 beta release contains the complete Fortran 2003 standard? Does this include support for internationalization i.e.

selected_char_kind("ISO_10646')

ChrisG

 

0 Kudos
7 Replies
Steven_L_Intel1
Employee
669 Views

No - that's not required to support F2003. We support that syntax, but no alternate character kinds.

0 Kudos
Craig_Dedo
New Contributor I
669 Views

It would be very helpful for many of us to include support for the ISO 10646 UCS-4 character kind.  Several other Fortran compilers, including the GNU GFortran compiler, support this character kind.  We live in a culturally diverse world and the availability of non-ASCII character set is very useful in many programming situations.

0 Kudos
Steven_L_Intel1
Employee
669 Views

We're aware of that and it's on our list. But it's a major effort, with implications throughout the compiler and run-time library, and development resources are finite.

0 Kudos
Chris_G_2
Beginner
669 Views

Thanks Steve: I had mistakenly thought that Unicode was part of the 2003 standard, but a closer reading of Metcalf, Reid & Cohen makes it clear that this is not the case, and I can see that it is (a) a lot of work and (b) low on the list of priorities.

It raises another question however concerning internationalization and localization:

I have a Fortran program that is part of larger project that is written in C, C++ etc. My program uses progress meters and I want to localize the text in these. I can use VS to create a localizable resource.resx file (or an .rc file and convert it to an .resx file) into which I load the strings for the headers of the progress meters. Is there any way I can access the .resx file in Fortran? Is there any literature on this topic anyone knows of? Indeed, is there any way of determining the local language on the host computer?

ChrisG

0 Kudos
andrew_4619
Honored Contributor III
669 Views

You can use the NLS functions https://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-win/GUID-3859DDD6-09A5-49C5-B6F0-B9D7C099B2CA.htm or talk direct to the windows sdk to determine attributes of the locale of the computer.

I

0 Kudos
FortranFan
Honored Contributor III
669 Views

Chris G. wrote:

...

It raises another question however concerning internationalization and localization:

I have a Fortran program that is part of larger project that is written in C, C++ etc. My program uses progress meters and I want to localize the text in these. I can use VS to create a localizable resource.resx file (or an .rc file and convert it to an .resx file) into which I load the strings for the headers of the progress meters. Is there any way I can access the .resx file in Fortran? Is there any literature on this topic anyone knows of? Indeed, is there any way of determining the local language on the host computer?

ChrisG

An approach I use is to have callback from Fortran to C, C++, (C#, Visual Basic.NET), etc. and do all the internalized/localized text processing in these environments instead of Fortran.  With "Modern Fortran" and C interoperability, it is much cleaner now to exchange data in mixed language enivironments.  I find this approach much easier to develop, support, and maintain.  Something you may wish to consider.

0 Kudos
Chris_G_2
Beginner
669 Views

Thanks everyone for your useful comments. I will follow FortranFan's ideas.

ChrisG

0 Kudos
Reply