----- Original Message -----
| From: "David Snyder" <dsnyder0...@gmail.com>
| To: "Vile mailing list" <vile@nongnu.org>
| Sent: Thursday, December 14, 2023 7:51:46 PM
| Subject: Encoding translation error on macOS Sonoma 14.2

| After upgrading to macOS Sonoma 14.2 (MacBook Pro with Apple M1 Pro
| processor), I can't seem to get vile to run. Even after a fresh build, I
| see the following error:

hmm - I've 3 macs that I intend upgrading to Sonoma, but as usual put it off.
One is an M2 (the others are Intel).  Those are all on Ventura, and locales 
work.

"locale -a |wc -l" lists 203 settings.

What does "locale" print for your environment?
The message indicates that there's no locale set.

If Apple's lobotomized locale support, you might just as well set

    LC_ALL=en_US.UTF-8

(that would probably even work with something like OpenBSD).

| 
| $ vile
| Cannot setup translation from  to UTF-8
| 
| Looking at the source I see this function in eightbit.c:
| 
| static void
| open_encoding(char *from, char *to)
| {
|    if (!try_encoding(from, to)) {
|        fprintf(stderr, "Cannot setup translation from %s to %s\n", from,
| to);
|        tidy_exit(BADEXIT);
|    }
| }
| 
| I also tried rebuilding using --with-locale:
| 
| $ ./configure -v --with-locale
| 
| Unfortunately, the same result. Also, this is on an M1 MacBook Pro, so I
| don't have gdb handy.
| 
| Compiling using --with-trace, I see these warnings, which look
| disconcerting:
| 
| trace.c:488:59: warning: overflow in expression; result is 2147483647 with
| type 'int' [-Winteger-overflow]
|            int c = buffer[j] & ((1 << (8 * sizeof(VIDEO_TEXT))) - 1);
|                                                                 ^
| trace.c:488:30: warning: shift count >= width of type
| [-Wshift-count-overflow]
|            int c = buffer[j] & ((1 << (8 * sizeof(VIDEO_TEXT))) - 1);
|                                    ^  ~~~~~~~~~~~~~~~~~~~~~~~~
| 
| Hoping someone with better development tools on Apple silicon can reproduce
| this issue and provide more helpful debugging info. Thanks.
| 
| -- David

-- 
Thomas E. Dickey <dic...@invisible-island.net>
https://invisible-island.net

Reply via email to