i18n for gfortran-compiled code (or Fortran in general)

Jerry DeLisle jvdelisle@frontier.com
Sun Aug 29 19:17:00 GMT 2010


On 08/29/2010 06:25 AM, Dennis Wassel wrote:
> Hi list,
>
> I have recently been thinking about adding i18n to our existing
> Fortran/C library at work. Since our primary compiler is gfortran, I
> hope this is an acceptable place to ask.
>
> What I am thinking about is rather simple string localisation, limited
> to "non-extraordinary" languages in and around Europe and America, no
> LTR/RTL stuff, and no Asian glyphs. Think English, German, Spanish,
> Turkish, for instance.
> It is primarily supposed to cooperate peacefully with gfortran and the
> existing machinery under various platforms (linux, *nix, windoze,
> mac), and it would need to have a "switch off" feature in favour of a
> default English fallback. Non-too-fancy preprocessor tricks are
> acceptable, since all source files are preprocessed anyway.
>
> What I found out so far:
> * Asking google for "Fortran i18n" and the like more or less only
> tells me that FX pushed this for gfortran.
> * gettext is probably too C-centric for it to integrate peacefully,
> and it is GPL, so unacceptable for our code anyway.
> * gfortran>= 4.4 has some plumbing for wide characters in place,
> though not for UTF-8. Then again, UCS-4 is surely enough for my
> purposes.
>
> Has anyone ever run across a swiss army-knife ("eierlegende
> Wollmilchsau", "schaap met vijf poten", ...) like this?
> I'll happily accept that this might be futile and foolish, but before
> burying the idea right away, at least I wanted to pick the brains of
> the more experienced (G)Fortraner's here.
>
> Thanks for any input, idea or random thought on this!
> Dennis
>
gfortran does support UTF-8 for I/O.  Are you thinking of source code? If so, I 
have considered adding UTF-8 capability for Fortran source code.  We have the 
necessary functions in our libgfortran already.

Jerry



More information about the Fortran mailing list