El lun, 3 ago 2026 a la(s) 5:42 a.m., Hans Hagen via ntg-context ( [email protected]) escribió:
> On 8/3/2026 10:42 AM, Jairo A. del Rio wrote: > > > > > > El lun, 3 ago 2026 a la(s) 3:02 a.m., Hans Hagen via ntg-context (ntg- > > [email protected] <mailto:[email protected]>) escribió: > > > > On 8/3/2026 9:29 AM, Jairo A. del Rio wrote: > > > Hi, list! When one tries to print non-ASCII characters using > > > logs.texerrormessage, based on tex.error, "weird character" and a > > > negative value is printed and characters are just ignored. This > > warning > > > comes from here in texprinting.c: > > > > > > 153 │ void tex_print_char(int s) > > > 154 │ { > > > 155 │ if (s < 0 || s > 255) { > > > 156 │ tex_formatted_warning("print", "weird character > > %i", s); > > > > > > I wonder whether a cast is needed here or it's rather a bug > > coming from > > > custom compiling flags as it is my case. > > > > Unless I did something wrong, this one should never be called with a > > negative or > 255 integer as it eventually outputs one byte. If there > > are unicode characters printed they go via the utf serializer (that > > iself then outputs per char). So, this test is kind of redundant but > if > > you somehow have > 255 integers going into it, the test indicates an > > error anyway. Fwiw, this logging is kind of complex as we have log > file > > in parallel to terminal output and in other printing routines also > pipe > > into strings. > > > > > > I removed the test and recompiled both luametatex and ConTeXt. Now > > Unicode characters are printed normally and everything else seems to > > work as I compile some documents > > well, it means that you let c print an invalid character so i guess it > will crash at some point > > what was your test case as it might was wel be some other issue there > Just this: \starttext \startluacode % logs.texerrormessage doesn't make any difference tex.error"Cigüeña" \stopluacode \stoptext and I get this luatex warning > print: weird character -61 luatex warning > print: weird character -68 luatex warning > print: weird character -61 luatex warning > print: weird character -79 tex error > tex error on line 5 in file ./test.tex: Cigea I thought it might have been something about my custom build, but I've tested stock luametatex and I have similar results on Linux. 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 > ----------------------------------------------------------------- > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : [email protected] / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___________________________________________________________________________________ >
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
