To use an example that (most?) people can probably read:
Character(kind=latin1) :: str*50, str2*60
str = latin1_"« ¡This string uses Latin-1 characters! »"
str2 = latin1_"ÀÁÂÃÄÅÆ&
&ÇÈÉÊËÌÍÎÏÐ&
&ÑÒÓÔÕÖØ&
&ÙÚÛÜÝÞß&
&àáâãäåæ&
&çèéêëìíîïð&
&ñòóôõöø&
&ùúûüýþÿ"
Assuming that ordinary ASCII is the default character set
of your implementation, but that is does also support Latin-1,
this would be the only convenient way to process those
Latin-1 characters. I suppose you could process them as
integer arrays using the Latin-1 collating sequence and no
actual character literals, but that's not convenient.
Now, suppose your implementation also supported Latin-2,
or Cyrillic, etc. (that would be the reason only ASCII was default,
so that the implementation cold provide all those ISO 8859-*
alternatives as non-default KINDs), those would use other KINDs
in order to process them.
I guess Richard Maine has already pointed out that (at least in the
US) it's not common to find an implementation that supports more
than one character KIND. So, the issue doesn't arise much. I'd
like to see more support for UNICODE or, at least, the 8859 family.
Maybe European implementations carrys such support?
--
J. Giles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|