UK Currency Symbol in 7.2 Console - A Question actually about FreeBSD

2009-05-29 Thread Graham Bentley

Hello All,

Im still struggling with this one and have tried all I could find
by Googling lists and forums. @ and  keys are fine as are
every other key apart from £ symbol. Can anyone suggest
ways to track this down. At 'Login:' I can actually get £ but
after loging I get a beep? I have tried various fonts and maps
to no avail.

Any suggestions / pointers, even an RT[URL]FM or useful
flame appreciated.

Thanks! 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: UK Currency Symbol in 7.2 Console - A Question actually about FreeBSD

2009-05-29 Thread bsd

Hi,

I use a Macintosh as client host, but this could be any computer as  
long as you have a working keyboard configured.



My shell is bash (latest port version).

In my .bashrc I have included the following:

# Display quoted characters
stty cs8 -istrip -parenb
bind 'set convert-meta off'
bind 'set meta-flag on'
bind 'set output-meta on'


Furthermore I have configured emacs (my favorite editor) to also  
handle UTF8 character and encoding


In my .emacs:

(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(prefer-coding-system 'utf-8)



This allows me to have all my characters encoded in UTF-8.


One more interesting thing is the prompt (more fancy than really  
usefull):


In .bashrc:

case $TERM in
xterm*|rxvt*)
PS1=\[\033[01;33;33m\]\h \w -- \[\033[00m\]
PS2='\u:\w '
;;
screen)
#PS1='\e[1;31...@\h:\e[1;37m\w\e[1;31m\$\e[0;37m '
PS1=\[\033[01;36;36m\]\h \t \w screen $ \[\033[00m\]
;;
*)
PS1='\h:\w\$ '
;;
esac


And the history search, still in .bashrc:

bind '\e[A':history-search-backward
bind '\e[B':history-search-forward







Le 29 mai 09 à 08:54, Graham Bentley a écrit :


Hello All,

Im still struggling with this one and have tried all I could find
by Googling lists and forums. @ and  keys are fine as are
every other key apart from £ symbol. Can anyone suggest
ways to track this down. At 'Login:' I can actually get £ but
after loging I get a beep? I have tried various fonts and maps
to no avail.

Any suggestions / pointers, even an RT[URL]FM or useful
flame appreciated.

Thanks!



Gregober --- PGP ID -- 0x1BA3C2FD
bsd @at@ todoo.biz


P Please consider your environmental responsibility before printing  
this e-mail



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: UK Currency Symbol in 7.2 Console - A Question actually about FreeBSD

2009-05-29 Thread Lars Eighner

On Fri, 29 May 2009, Graham Bentley wrote:


Hello All,

Im still struggling with this one and have tried all I could find
by Googling lists and forums. @ and  keys are fine as are
every other key apart from £ symbol. Can anyone suggest
ways to track this down. At 'Login:' I can actually get £ but
after loging I get a beep? I have tried various fonts and maps
to no avail.

Any suggestions / pointers, even an RT[URL]FM or useful
flame appreciated.


All these remarks apply to the console (and virtual ttys) not xterm
or other terminals in X.

First, you must have a font with £ in it.  It seems you do if you ever see
this character, but for the record your most likely choices are iso-8859-1
and iso-8859-15 (also has the Euro symbol).  It is best to load these at
boot in three sizes:

These lines in /etc/rc.conf

font8x14=iso-8x14
font8x16=iso-8x16
font8x8=iso-8x8

will load iso-8859-1

and these

font8x14=iso15-8x14
font8x16=iso15-8x16
font8x8=iso15-8x8

will load iso-8859-1

There are applications that will help you to edit a font, but that is beyond
the scope here.

remember, in /etc/rc.conf, when the same item is set multiple times, the
last entry wins, so it is best to read this file from the bottom and add at
the bottom.  (Do not edit the master file in /etc/defaults.)

You can see what fonts are on your system and try one out temporarily using
the vidfont command.

Second you must set your TERM variable to something compatible.  You do this
in your shell login scripts.  You can do this for everyone using the same
shell in /etc or per user in the dot file in the home directory of the user. 
Consult the man page for your particular shell.


This works for bash in /etc/profile or in the user's .profile:

TERM='cons25l1'
export TERM

cons25l1 is for an 80x25 console using iso-8859-1.  It also appears to work
for iso-8859-15.  If you have a different number of characters (than 80) or
a different number of lines (than 25), select something appropriate from
/usr/share/misc/termcap  (there may be symbolic link to it from
/etc/termcap).  DO NOT EDIT THE TERMCAP.

Finally you need to select an appropriate keyboard from
/usr/share/syscons/keymaps and be sure it is entered in /etc/rc.conf.

Your main choices would seem to be uk.iso-ctrl.kbd and uk.iso.kbd.  Both
of these have £ at shift-3 (above the letter keys, not on the numeric
keypad).

You can try out keyboards with the keymap command.

this should be in your /etc/rc.conf

keymap='uk.iso.kbd'

(or the other one, if you choose it.  Remember, the LAST assignment to
keymap in /etc/rc.conf wins)

Keymaps are exceeding easy to edit in FreeBSD, which is one of the reasons I
use FreeBSD instead of one of the many linux distros I have tried.  If you
want to give it a try, I suggest you back it up first.

cp uk.iso.kbd uk.iso.kbd.dist

will do.

Then to use your edited map enter

keymap='uk.iso.kbd'

Here are a few lines from uk.iso.kbd:

# alt
# scan   cntrl  altalt   cntrl lock
# code  base   shift  cntrl  shift  altshift  cntrl  shift state
# --
  000   nopnopnopnopnopnopnopnop O
  001   escescescescescescdebug  esc O
  002   '1''!'nopnop'`''`'nopnop O
  003   '2'''nulnul'@''@'nulnul O
  004   '3'163nopnop'#''#'nopnop O
  005   '4''$'164164'4''$'nopnop O
  006   '5''%'nopnop'5''%'nopnop O

The character code for £ is 163.  You get that from shift-3 (using the 3
from above the letter keys, not the numeric keypad).  The character code
for the Euro sign is 164.  You should be able to see that you get that from
cntrl-4.  If you had more use for that than $, you could switch them by
editing line 005 to read:

  005   '4'164'$'164'4''$'nopnop O

If you have an edited keymap you like, keep a copy in a safe place (like
your home directory) in case it get stomped when you upgrade your system.


If you do not have root access, you can change keymaps with kbdcontrol,
and you could change fonts and video modes with vidcontrol.  (See the man
pages for each if you are interested.)  You could put these in the dot file
for your particular shell to have them take effect when you login.

You can even change these on a per-application basis by using a shell script
to launch particular applications.  This might be useful, for example, if
you had applications that do not look right without the IBM box-drawing
characters.  You could use vidcontrol in a script to switch to cp437 before
calling the application and to switch back afterwards.  Fortunately many
applications these days know what to do or can be configured to do the right
thing without such drastic measures.

--
Lars Eighner

Re: UK Currency Symbol in 7.2 Console - A Question actually about FreeBSD

2009-05-29 Thread Graham Bentley

Lars,

Thanks for taking the time in your detailed reply and
I will look into your suggestions however one thing about
this eludes me ; I have never ever had to even think about
this until 7.2 [ie in all previous verisons I chose uk.iso and
swiss font - I always had £ key?]

Thanks in any case (the list works, long live the list!) 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org