DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th December 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default Encoding issue with GNU Screen

OS Version: FreeBSD 7-Stable
Screen Version: Screen version 4.00.03 (FAU) 23-Oct-06
Top level Terms: rxvt-unicode v9.05, xterm v237
PAGER: less -FiJqX
EDITOR: vim
Locale output:
Code:
Terry@dixie$ locale                                                        5:02
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=en_US.UTF-8
Terry@dixie$                                                               5:02
Top level $TERM is = rxvt / xterm (^ respectively ^), while the screen sessions use $TERM is = screen.

I first noticed the problem when I had to bring out an old friend in my toolbox (perl), when using perldoc I would get strange accented a or A like characters in place of certain characters in the output, so I just did a ssh to my server and read the perldocs there (it's an OpenBSD box with no LC_* or LANG settings in use) and things worked perfect. When I finished my scripts, I noticed the plain old documentation output to my term was just as wacky. As another test, I opened (in vim) some old files with German umlauts, which were also displayed crazy -> as they would be under the wrong locale.


If I open urxvt or xterm and then run perldoc (or check my files) in that without screen, everything works correctly. I've tried screens -U, -a, -O, and -T options but no dice.


Has anyone else experienced this issue with screen, or perhaps know of a work around?
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #2   (View Single Post)  
Old 15th December 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

I have described similar things here, maybe that would help you:
http://daemonforums.org/showthread.php?t=125
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #3   (View Single Post)  
Old 16th December 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Nope

My system has ~/login.conf set for en_US.UTF-8, and in ~/.Terry_shrc which serves like ENV in all my interactive shells; it sets LANG, LC_ALL, and MM_CHARSET; since I've encountered some programs that obey $LC_ALL but not $LANG. But no luck what so ever with getting this to work in screen :\


Now, playing around a bit more, I have noticed this; if I launch urxvt, then execute screen -U -m to start a new screen session, it doesn't work irregardless of the environment variables (ref my last post). But if I launch an xterm from bbrun or my current urxct/screen session, launch urxvt from that xterm, then run screen -m in the urxvt window that comes up -> perldoc works correctly.

oy...
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #4   (View Single Post)  
Old 28th December 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Placing this in the shell script that GDM uses to start my X session, seems to correct most of the problem:

Code:
 #
 # override our locale environment
 #
 # locale related settings   (DEFAULT)
 TZ='Etc/UTC'; export TZ                 # my time zone
 LANG='en_US.UTF-8'; export LANG         # language.encoding
 # some programs require us to set LC_ALL manually as well.
 LC_ALL='en_US.UTF-8'; export LC_ALL
 MM_CHARSET='UTF-8'; export MM_CHARSET
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Encoding // Pure Terminal // Virtual Terminal vermaden Guides 1 25th June 2010 08:02 AM
Screen + utf8 not working Zmyrgel OpenBSD General 1 10th March 2009 03:12 PM
screen casting via v4l ddekok Other BSD and UNIX/UNIX-like 2 17th July 2008 03:27 PM
Changing encoding of text in MySQL database stukov Programming 5 15th July 2008 09:48 PM
How to take a screen in xfce? aleunix OpenBSD Packages and Ports 23 4th June 2008 02:54 PM


All times are GMT. The time now is 02:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick