Re: [dev] Bringing together OS'es terminals and their codepages

From: Thorsten Glaser <tg_AT_mirbsd.de>
Date: Tue, 3 Dec 2013 20:32:48 +0000 (UTC)

patrick295767 patrick295767 dixit:

>I think about various possible POSIX and non-POSIX platforms, which
>allow compiling with gcc or g++:

You missed MirBSD, which incidentally is UTF-8 only (with the known
issue that you need to run “script -lns” or GNU screen on the text
console, but for Unicode you want xterm anyway).


Troels Henriksen dixit:

>patrick295767 patrick295767 <patrick295767_AT_gmail.com> writes:

>> Let's take a well-known program: vim compiled for Windows. If you use
>> gvim.exe in Windows, you have a perfect result. No simple problem with
>> characters.
>> However, if you take vim.exe (from the same directory as gvim.exe) and
>> use it in the windows console (execute: cmd then type vim), you end up

>That's because the standard Windows terminal is terrible. I would
>advise never using it. Pretty much every other terminal in works
>properly, because they don't try to simulate some ancient DOS
>abomination.

You’re right on the suggestion of not using it. (I read about PuTTY
being suggested as replacement – does it allow a “local” shell? If
so, it could even be used on Win32s which allowed 32-bit programs
to run on Win3.1 but not console programs… hm…)

But there are two ways to fix this for vim.exe:

• chcp 65001 (switch the “codepage” to UTF-8, works horrible).

• Change vim.exe to use the “wide” console instead of the ANSI/OEM
  console functions, which use proper UCS-2 (later UTF-16) characters
  for terminal I/O (works like a charm and even in NT 3.x).


Christoph Lohmann dixit:

>On Tue, 03 Dec 2013 18:53:04 +0100 Noah Birnel <nbirnel_AT_gmail.com> wrote:
                                                         ^^^^^^^^^
>> On Tue, Dec 03, 2013 at 04:00:14PM +0100, Christoph Lohmann wrote:
>> > Windows has to
>> > adapt to Open Source and not the other way around.

Right. Actually, they kinda did and are no longer among the biggest
three offenders against OSS.

>> Hahahahaha.

>Please read up on software history. But maybe your poor Windows adminis‐
>trator life took away your sanity and sense for what’s possible. Please

Or his Googlemail administrator. Or both…

>leave suckless as fast as you can.

I did suggest banning them, didn’t I? ☺


bye,
//mirabilos
-- 
„Also irgendwie hast du IMMER recht. Hier zuckelte gerade ein Triebwagen mit
der Aufschrift "Ostdeutsche Eisenbahn" durch Wuppertal. Ich glaubs machmal
nicht…“						-- Natureshadow, per SMS
„Hilf mir mal grad beim Denken“			-- Natureshadow, IRL, 2x
Received on Tue Dec 03 2013 - 21:32:48 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 03 2013 - 21:48:07 CET