From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: non-ascii chars in cmd.exe (Windows)
Date: Fri, 13 Nov 2020 21:01:59 +0100 [thread overview]
Message-ID: <fe03b8d8-f890-4beb-483b-545a6e97e4d2@gmx.es> (raw)
In-Reply-To: <72ff15cd-efaf-e4e8-5a28-fc7f85791309@xs4all.nl>
On 11/13/20 3:15 PM, Hans Hagen wrote:
> On 11/13/2020 2:49 PM, Pablo Rodriguez wrote:
>> [...]
>> Since console input is UTF-16LE, I guess I may need something in Lua
>> similar to 'regimes.translate(str, "utf16le")'.
>
> the console uses whatever code page you have configured and it also
> relates to the code page used for filenames .. the 16 bit values are
> used deep down and what you use gets translated into that (often folks
> still use some 8 bit code page so that then gets mapped) .. there is no
> way the system can know if what you provide is as it's bytes in whatever
> encoding used
>
> so, you need to look what your system is configured for
I think that codepage is named locale codepage (as different from the
one in the console [or whatever chcp should change]).
I wonder whether this is named codeset in this Windows tool:
> wmic os get locale, oslanguage, codeset
CodeSet Locale OSLanguage
1252 0c0a 3082
> (this is independent of the output to the console which is what the
> 65001 does)
It seems that UTF-8 as locale codepage is only available in Win10.
An easy workaround is to rewrite the batch file to:
chcp 65001
set /P "name=Name? "
context --arguments="name={%name%}" document.tex
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2020-11-13 20:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 21:39 Pablo Rodriguez
2020-11-12 21:55 ` Hans Hagen
2020-11-13 13:49 ` Pablo Rodriguez
2020-11-13 14:15 ` Hans Hagen
2020-11-13 20:01 ` Pablo Rodriguez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe03b8d8-f890-4beb-483b-545a6e97e4d2@gmx.es \
--to=oinos@gmx.es \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).