From 96864fbe1b19d06a9d7b6fdb60fe00f34178f9ac Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Sun, 24 Jun 2012 14:27:57 -0500 Subject: [PATCH] * usr/bin/byobu, usr/lib/byobu/include/constants, usr/lib/byobu/logo, usr/share/man/man1/byobu.1: LP: #938920, #952724 - fix "infinite scrolling" of status line, when using multibyte utf-8 characters in status - detect character map, and only enable utf-8 when possible --- debian/changelog | 5 +++++ usr/bin/byobu | 1 + usr/lib/byobu/include/constants | 4 ++-- usr/lib/byobu/logo | 2 +- usr/share/man/man1/byobu.1 | 4 ++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0257da34..e2edd8ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,11 @@ byobu (5.20) unreleased; urgency=low * debian/postrm: LP: #996873 - at package removal, ensure that we remove the auto-launch symlink if it exists + * usr/bin/byobu, usr/lib/byobu/include/constants, usr/lib/byobu/logo, + usr/share/man/man1/byobu.1: LP: #938920, #952724 + - fix "infinite scrolling" of status line, when using multibyte + utf-8 characters in status + - detect character map, and only enable utf-8 when possible -- Dustin Kirkland Fri, 08 Jun 2012 17:25:23 -0500 diff --git a/usr/bin/byobu b/usr/bin/byobu index 8cf98b0e..b5e4bcb4 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -45,6 +45,7 @@ if [ -z "${BYOBU_PREFIX}" ]; then . "$HOME/.byoburc" fi fi +export BYOBU_CHARMAP=$(locale charmap) [ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc" [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX . "${BYOBU_PREFIX}/lib/${PKG}/include/common" diff --git a/usr/lib/byobu/include/constants b/usr/lib/byobu/include/constants index ac1ac5ea..46477097 100755 --- a/usr/lib/byobu/include/constants +++ b/usr/lib/byobu/include/constants @@ -20,8 +20,8 @@ PKG="byobu" -# UTF8 support in the hardstatus is coming one day in Screen -if [ "$UTF8" = "1" ] || [ "$BYOBU_BACKEND" = "tmux" ]; then +# UTF-8 support in the hardstatus is coming one day in Screen +if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then #ICON_C="℃" #ICON_F="℉" ICON_C="C" diff --git a/usr/lib/byobu/logo b/usr/lib/byobu/logo index d266c93f..1e97fe94 100755 --- a/usr/lib/byobu/logo +++ b/usr/lib/byobu/logo @@ -54,7 +54,7 @@ __logo() { case "$distro" in *ubuntu*) if $MARKUP; then - if [ "$UTF8" = "1" ] || [ "$BYOBU_BACKEND" = "tmux" ]; then + if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then if [ ! "$VTE_CJK_WIDTH" = "1" ] && [ ! "$VTE_CJK_WIDTH" = "wide" ] ; then color m W; printf " u "; color - else diff --git a/usr/share/man/man1/byobu.1 b/usr/share/man/man1/byobu.1 index 2465a27c..c5d96146 100644 --- a/usr/share/man/man1/byobu.1 +++ b/usr/share/man/man1/byobu.1 @@ -91,7 +91,7 @@ Note that BYOBU_CONFIG_DIR=\fI$XDG_CONFIG_HOME/byobu\fP if defined, and \fI$HOME \fBtime\fP \- the system time in HH:MM:SS format; displayed in the lower bar on the far right in the default text and default background colors -\fBtime_binary\fP \- only for the hard core geek, the local system time in binary; requires UTF8 support in a VERY recent version of GNU Screen; you must additionally set "UTF8=1" in \fI$BYOBU_CONFIG_DIR/statusrc\fP; displayed in the lower bar on the far right in the default text and background colors +\fBtime_binary\fP \- only for the hard core geek, the local system time in binary; requires UTF-8 support in a VERY recent version of GNU Screen; displayed in the lower bar on the far right in the default text and background colors \fBtime_utc\fP \- the UTC system time in HH:MMformat; displayed in the lower bar on the far right in dark text on a light background @@ -202,7 +202,7 @@ Apple Mac OSX terminal users have reported 'flashing text'. You can fix this in Apple Mac keyboard users may need to specify a vt100 terminal by adding this to your OSX profile, in order to get Byobu's function keys and colors to work: alias ssh='TERM=vt100 ssh' -Users of a non-UTF8 locale (such as cs_CZ charset ISO-8859-2), may need to add "defutf8 off" to \fI~/.screenrc\fP, if some characters are rendering as "?". +Users of a non-UTF-8 locale (such as cs_CZ charset ISO-8859-2), may need to add "defutf8 off" to \fI~/.screenrc\fP, if some characters are rendering as "?". Users who customize their PS1 prompt need to put this setting in \fI~/.bashrc\fP, rather than \fI~/.profile\fP, in order for it to work correctly with Byobu.