Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Anthk Newsgroups: comp.lang.postscript Subject: Re: Documentation for utf8decode and ushow (nee unicodeshow) Date: Tue, 13 Dec 2022 20:51:12 -0000 (UTC) Organization: A noiseless patient Spider Lines: 40 Message-ID: References: <6224af22$1@news.ausics.net> Reply-To: Ander GM Injection-Date: Tue, 13 Dec 2022 20:51:12 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="0e53fc1536ff47a6e173db623e5dbf9f"; logging-data="2734033"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MCod+V7ikAfrVM8VvcySb" User-Agent: slrn/1.0.3 (OpenBSD) Cancel-Lock: sha1:JmEAkw+EtAau3lbIM+N8+fGAi7Y= Xref: csiph.com comp.lang.postscript:3820 On 2022-03-06, David Newall wrote: > Hello All, > > I've almost finished my UTF-8 decode and Unicode show work. Significant > changes are: > > 1. unicodeshow is now ushow. The names all got a bit long. > 2. The decoder has been rewritten based on code by Thompson and Pike in > Plan 9. They wrote an incredibly clever test for overlong sequences. > 3. Documentation. Yes, really! > https://davidnewall.com/software/utf8show/PostScript%20UTF8%20Extension%20Reference.pdf > > Have I left anything out? > > Regards, > > David I coudn't get your examples running in GhostScript: ## code openbsd$ gs utf8test.ps GPL Ghostscript 9.56.1 (2022-04-04) Copyright (C) 2022 Artifex Software, Inc. All rights reserved. This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY: see the file COPYING for details. Error: /stackunderflow in --def-- Operand stack: Map Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1990 1 3 %oparray_pop 1989 1 3 %oparray_pop 1977 1 3 %oparray_pop 1833 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:761/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- Current allocation mode is local Current file position is 561 ## eof Any tips on using it, for instance, with an example how to integrate your code as a "library"?