LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (http://www.linuxquestions.org/questions/gentoo-87/)
-   -   Strange white square symbols in place of left and right apostrophe (http://www.linuxquestions.org/questions/gentoo-87/strange-white-square-symbols-in-place-of-left-and-right-apostrophe-4175472785/)

5pike 08-09-2013 12:01 PM

Strange white square symbols in place of left and right apostrophe
 
Hi,

I've recently installed Gentoo and everything seems ok apart from the fact I see a strange (small white square) characters where apostrophes should be in certain output. For example, cp and rm with the -v parameter option on.

Code:

# touch a.txt
# cp -v a.txt b.txt

Produces the below output. Except white squares (with putty it seems to show as '').

Code:

a.txt -> b.txt
If I change the translation options within putty to use the UTF-8 remote character set, the output is displayed correctly.

Code:

a.txt -> b.txt
removed ./a.txt
removed ./b.txt

Here is my locale settings.

Code:

# locale
 LANG=en_GB.UTF-8
 LC_CTYPE="en_GB.UTF-8"
 LC_NUMERIC="en_GB.UTF-8"
 LC_TIME="en_GB.UTF-8"
 LC_COLLATE=C
 LC_MONETARY="en_GB.UTF-8"
 LC_MESSAGES="en_GB.UTF-8"
 LC_PAPER="en_GB.UTF-8"
 LC_NAME="en_GB.UTF-8"
 LC_ADDRESS="en_GB.UTF-8"
 LC_TELEPHONE="en_GB.UTF-8"
 LC_MEASUREMENT="en_GB.UTF-8"
 LC_IDENTIFICATION="en_GB.UTF-8"
 LC_ALL=

Any idea what's going on/how to fix? Thanks in advance.

ShadowCat8 08-09-2013 01:41 PM

Greetings,

And, welcome to Gentoo! :)

One thing that I notice is that you actually have your LANG defined. On most of the boxes I have built with Gentoo, I do not define LANG. Did you set it in /etc[/portage]/make.conf, or is it coming from your DE? As a quick note, doing a recursive search for LANG in /etc/* showed me this:
Code:

/etc/X11/startDM.sh:# We need to source /etc/profile for stuff like $LANG to work
/etc/apache2/modules.d/00_languages.conf:<IfDefine LANGUAGE>
/etc/conf.d/env_whitelist:# taken from /etc/profile.env - meaning, if you need to set LANG or such,
/etc/conf.d/apache2:#  LANGUAGE    Enables content-negotiation based on language and charset.
/etc/conf.d/apache2:APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE"
/etc/init.d/webmin:            --env LANG= \
...<snip>...
/etc/speech-dispatcher/modules/swift-generic.conf:# You can use the variables $LANGUAGE, $VOICE, $PITCH and $RATE
/etc/sudoers:# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
/etc/xcdroast.conf:LANGUAGE = ""
/etc/xdg/openbox/environment:#LANG=en_CA.UTF8

Only place I have defined what language/charset support I have on a system is in /etc/locale.gen. From the /etc/locale.gen on this system:
Code:

# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you.  After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.

#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP
#en_HK ISO-8859-1
#en_PH ISO-8859-1
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
#es_MX ISO-8859-1
#fa_IR UTF-8
#fr_FR ISO-8859-1
#fr_FR@euro ISO-8859-15
#it_IT ISO-8859-1
en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_GB.UTF8 UTF-8
en_GB ISO-8859-1
en_AU.UTF-8 UTF-8
en_AU ISO-8859-1

#
## EOF

And as an interesting comparison, here's my locale output:
Code:

tech8 test # locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
tech8 test #

HTH. Let us know.

5pike 08-09-2013 08:47 PM

Hi,

Yeah, I did explicitly set it as per the docs.

I altered /etc/env.d/02locale to.

Code:

LANG=""
LC_COLLATE="C"

And ran.

Code:

env-update && source /etc/profile
Now everything works!

I don't really understand it though...my locale output now looks exactly like yours. Everything seems to work though, I have the symbol etc.

Thanks again!! Really appreciate your help!

Bill Gates 666 09-11-2013 04:47 AM

Quote:

Originally Posted by 5pike (Post 5006602)
Hi,
Now everything works!

I don't really understand it though...my locale output now looks exactly like yours. Everything seems to work though, I have the symbol etc.

Thanks again!! Really appreciate your help!

@Spike,

Can you please mark this thread as [SOLVED] - thanks!! Helps out people looking for unsolved threads... :)

Mr Gates

5pike 10-11-2013 07:59 AM

[SOLVED] Strange white square symbols in place of left and right apostrophe
 
Actually, I wasn't quite sure that it was solved - I still got some strange results when using the sign both inside and out of X. However, I have now solved the issue.

After running the below command, I noticed that Gentoo lists the locale as "en_GB.uft8", not "en_GB.UTF-8".

Code:

$ locale -a
C
POSIX
en_GB
en_GB.iso88591
en_GB.utf8

I simply edited /etc/env.d/02locale to look like.

Code:

LANG="en_GB.uft8"
LC_COLLATE="C"

Job done!


All times are GMT -5. The time now is 04:56 AM.