2

I am using Ubuntu 10.04 with GNOME Terminal 2.30.2, but when I ssh into a RedHat server, my terminal does not display correctly.

For example, the help pages for R look like this:

 Objects of class ���"glm"��� are normally of class ���c("glm", "lm")���,
 that is inherit from class ���"lm"���, and well-designed methods for
 class ���"lm"��� will be applied to the weighted linear model at the
 final iteration of IWLS.  However, care is needed, as extractor
 functions for class ���"glm"��� such as ���residuals��� and ���weights��� do
 *not* just pick out the component of the fit with the same name.

Is there a way to fix this?

1

3 Answers 3

2

The charset on the local system and the charset on the remote system don't match. You can verify this by executing locale charmap on each system. Set $LANG on the remote system appropriately to fix this.

2
  • you are right. my local system uses ANSI and the remote system uses UTF-8. But how do I set $LANG? Although I can't change the remote system, on my desktop LANG='UTF-8' did not change the charset Apr 21, 2011 at 22:21
  • You have to start gnome-terminal with the correct charset; changing it after the fact isn't enough. LANG=en_US.utf-8 gnome-terminal Apr 21, 2011 at 23:37
4

As Wil suggested, the terminal is attempting to display multibyte Unicode characters but the font does not support the characters in question or there is no Unicode support at all. As a result, placeholder characters are used in their place indicating that the characters cannot be properly displayed.

A possible solution is to select a different font with better Unicode support. However, make sure that the font is monospaced - consistent character spacing is expected in a terminal emulator.

3
  • +1 Thanks for the reference, I have no idea how to fix it and was going to write similar to this as a comment but had a phone call so just wrote that little joke! Apr 21, 2011 at 21:29
  • thanks, but this doesn't work - I have it set to the moospace font 'monaco' by default, but the error also occurs with 'monospace'. However, I did notice that the problem only occurs when I have ssh'd and am working on a server. I have changed my question to reflect this. Apr 21, 2011 at 21:41
  • This may be caused by the terminal type being emulated. Some terminals do not support Unicode and will cause this behavior.
    – bwDraco
    Apr 21, 2011 at 21:44
0

Open the Terminal's profile and change the font to something with "Mono" in the name, like Monospace or Liberation Mono.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .