[luatex] Accented characters on Windows / lfs

Hans Hagen j.hagen at xs4all.nl
Fri Sep 28 22:50:48 CEST 2018


On 9/28/2018 9:25 PM, Reinhard Kotucha wrote:
> On 2018-09-28 at 14:17:20 -0400, maxwell wrote:
> 
>   > On 2018-09-28 07:07, Harald Hanche-Olsen wrote:
>   > > From: Hans Hagen <j.hagen at xs4all.nl>
>   > > Date: 28 September 2018 at 12:07:03
>   > >
>   > > afaik windows has no utf filenames, so when i save a file with that
>   > > name
>   > > i get
>   > >
>   > > cöw.txt
>   > >
>   > > (internally i think names become unicode16 and display depends on
>   > > the  code page)  ...  (But I am not a windows user myself, nor do
>   > > I know much about windows, so I have nothing to contribute other
>   > > than this reference. Sorry if it is off the mark or irrelevant.)
>   >
>   > I think this is fundamentally correct, but just in case: Windows
>   > supports Unicode UTF-16 in file names in NTFS-based file systems
>   > (but not in the earlier FATxx file systems).  NTFS was introduced
>   > in Windows NT in 1993, and became a part of consumer-based Windows
>   > systems with Windows 2000: https://en.wikipedia.org/wiki/NTFS If
>   > you're getting weird characters (like in the line quoted above),
>   > it's likely that you're viewing them in a non-UTF16 application.
>   > So yes, in such applications the display depends on the code
>   > page--although code pages themselves are largely deprecated in
>   > modern versions of Windows, in favor of Unicode:
>   >
>   > https://en.wikipedia.org/wiki/Windows_code_page#Problems_arising_from_the_use_of_code_pages
> 
> It's not sufficient to declare code pages deprecated as long as they
> are unavoidable.  The default code page of the CLI is CP850 in Western
> Europe.  According to Phil Taylor it's possible to switch to UTF-8
> with
> 
>    chcp 65001
> 
> but this only works if the font used in the terminal window is "Lucida
> Console".  I can't imagine why it depends on a particular font but I
> tried and it obviously works.

i've been using dejavu nono for many years with success with utf in the 
console

(btw, the console code in recent windows 10 is rewritten and also much 
faster)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list