[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#665757: FTBFS on kfreebsd (IUTF8 termio is not POSIX) patch attached



Hello,

Thanks for filing this. I can't take this patch as written, but I am very interested in getting mosh working on FreeBSD.

(1) We need and use IUTF8 on Mac OS X (XNU), so #ifdef __linux__ is not quite the right test.

(2) On platforms without IUTF8, we still need _some_ solution to the "deletion of multibyte characters" problem.

If you can tell me what mechanism FreeBSD uses to avoid this problem so that backspace works correctly in non-canonical mode with non-US-ASCII characters, I'm happy to make mosh enable it.

Here's how to demonstrate the problem:

(1) Open a UTF-8 terminal emulator.

(2) Run "cat > /tmp/test.txt"

(3) Type (or paste): "The problemʼs not obvious.", including the curly Unicode apostrophe (U+2019) after "problem". Do not type a carriage return at the end of the line.

(4) Hit the backspace key 15 times to back up to "The problem".

(5) Type " is not obvious." and hit carriage return and then ^D.

(5a) You should see "The problem is not obvious." on the screen.

(6) Run "cat /tmp/test.txt"

(7) With IUTF8, the apostrophe will have been correctly deleted, and you should see "The problem is not obvious." (just as you saw when typing it)

(8) Without IUTF8, the kernel will not have correctly deleted the (three-byte) apostrophe, and you should see "The problem<?> is not obvious." (with the Unicode replacement character in place of <?>)

(8a) If you run "od -c /tmp/test.txt", you'll see it has garbage after the word "problem".

===

On the other hand, if FreeBSD really just has this bug and there is no way to fix it yet, I guess we can disable the use of IUTF8 on FreeBSD if that's what it takes to get mosh running... :-/ Perhaps the right approach is an autoconf test to see whether the platform has IUTF8.

Best regards, and thanks for using/testing mosh,
Keith

On Sun, 25 Mar 2012, Christoph Egger wrote:

Package: mosh
Version: 1.1-1
Severity: important
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

the IUTF8 termio constant isn't POSIX and isn't used on freebsd. We
still have UTF-8 enabled terminals though. Find below a patch I used
to make it build&work on Debian GNU/kFreeBSD

Regards

   Christoph

-- System Information:
Debian Release: wheezy/sid
 APT prefers unstable
 APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-1-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mosh depends on:
ii  libc0.1         2.13-27
ii  libgcc1         1:4.7.0-1
ii  libio-pty-perl  1:1.08-1+b2
ii  libncurses5     5.9-4
ii  libprotobuf7    2.4.1-1
ii  libstdc++6      4.7.0-1
ii  libtinfo5       5.9-4
ii  libutempter0    1.1.5-4
ii  openssh-client  1:5.9p1-4
ii  zlib1g          1:1.2.6.dfsg-2

mosh recommends no packages.

mosh suggests no packages.

-- no debconf information

Reply to: