On Fri, 26 Apr 2024 at 11:07, Matthias Schneider <[email protected]> wrote:

> Hi,
>
> I'm getting an error in Adobe Reader when I open the PDF generated by the
> following input (replace anyPNG with a valid PNG filename):
>
>
> os.setlocale('de_DE.UTF-8')
>
> tex.print(os.date('%A %x'))
>
>
>

As said, Luatex starts with
LC_CTYPE=C
LC_COLLATE=C
LC_NUMERIC=C
and stores in status.lc_collate, status.lc_ctype , status.lc_number the
values of the environment.

Be careful with os.setlocale:
the function returns the name of the new locale, or nil if the request
cannot be honored.
This should be ok :

print()
print ("===========>",os.setlocale('it_IT.UTF-8'))
print ("===========>",os.setlocale('de_DE.UTF-8'))
local date_locale=os.date('%A %x')
os.setlocale('C','ctype')
os.setlocale('C','collate')
os.setlocale('C','numeric')
tex.print(date_locale)


--
luigi

Reply via email to