Per the standard, the code shall be along the following lines:
integer, parameter :: CK = selected_char_kind('ISO_10646')
integer :: lun
character(kind=CK, len=*), parameter :: string = CK_'𨉟呐㗂越'
open(newunit=lun, encoding="utf-8", file='funny.txt', action='write')
write(lun, fmt=*) string
end
Processor implementors can explain whether and how their implementations can process the conforming code and the expected program behavior. Intel, for example, has decided not to support this into the foreseeable future which is a real shame given how widely UTF-8
is used globally. What does Intel Inc., say, have against Vietnamese here, Intel’s software team does not want to help Intel do business in Vietnam or what?