Deutsch   English   Français   Italiano  
<vemo54$1s0m9$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups: comp.lang.fortran
Subject: Re: Upcoming gfortran 15 will contain unsigned numbers
Date: Tue, 15 Oct 2024 16:51:32 -0500
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <vemo54$1s0m9$1@dont-email.me>
References: <veg58f$kb8e$1@dont-email.me> <vemj62$1qt5b$1@dont-email.me>
 <vemkc3$1rfq7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 15 Oct 2024 23:51:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="abbb39cb4340d1a82f3af460a499b163";
	logging-data="1966793"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+Vm77j6dQe5Vl8EY4gbE7wX065O/XYIsg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ww+Fs4tEJSBAeQTob2u8fHjleIo=
In-Reply-To: <vemkc3$1rfq7$1@dont-email.me>
Content-Language: en-US
Bytes: 2103

On 10/15/2024 3:46 PM, Steven G. Kargl wrote:
> On Tue, 15 Oct 2024 15:26:42 -0500, Lynn McGuire wrote:
> 
>>
>> Any plans to support UTF16 or UTF8 in gfortran ?
>>
> 
> gfortran has supported UTF-8 for long time now.  Here's
> an example from the manual.
> 
> 
>   program character_kind
>      use iso_fortran_env
>      implicit none
>      integer, parameter :: ascii = selected_char_kind ("ascii")
>      integer, parameter :: ucs4  = selected_char_kind ('ISO_10646')
> 
>      character(kind=ascii, len=26) :: alphabet
>      character(kind=ucs4,  len=30) :: hello_world
> 
>      alphabet = ascii_"abcdefghijklmnopqrstuvwxyz"
>      hello_world = ucs4_'Hello World and Ni Hao -- ' &
>    // char (int (z'4F60'), ucs4)     &
>    // char (int (z'597D'), ucs4)
> 
>      write (*,*) alphabet
> 
>      open (output_unit, encoding='UTF-8')
>      write (*,*) trim (hello_world)
>    end program character_kind

Thanks !

Lynn