GB pound sign (0xa3) no longer working in shell/vi/more with en_GB.ISO8859-15

For years I've used the LANG=en_GB.ISO8859-15 locale and been able to edit text files containing the pound sign £ character, stored as the single character 0xa3. This no longer works - if I press the pound key at a shell prompt, it is rejected with a bell and not echoed; if I edit a file with vi or display it with more any pound characters get escaped to \xa3 or <A3> respectively.

If I switch to LANG=en_GB.UTF-8 then everything works as expected at the prompt and with editing new files, but of course those files now have UTF-8 escapes in them (pound encodes in two bytes), and existing files are treated especially badly - vi suppresses the whole of any line containing just an 0xa3 since that isn't a legitimate UTF-8 coding. While I'd quite like to switch to UTF-8, I've got so many files that might have pound signs in them (source files, text files containing business records etc.) that it's impractical to upgrade and I need to get the old behaviour working again.

It's not clear which component of the system has the problem, but it is definitely NOT:
  • Keyboard configuration. The pound key works just fine in X11 applications, and even some terminal ones such as alpine. Likewise cat >somefile and typing a pound sign gets me a file with 0xa3 in it, and cat on that file displays it correctly, while more refuses to do so and instead escapes it.
  • X11/xterm. Though I'm mostly working in xterm, exactly the same happens on the console.
  • TERM setting doesn't seem to affect it (normally using TERM=xterm or TERM=cons25 as appropriate)
  • csh. I'm normally using csh/tcsh, but invoking /bin/sh doesn't change things
.
I believe this problem started when I did an upgrade to FreeBSD-11.2; I updated all my packages at the same time, but given this can be shown with just base system components (console, vi) it doesn't seem to be port related. I believe I was previously running FreeBSD-11.1, though I am not 100% certain.
 
Back
Top