Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Edit: I realized that the "problem" was not only in Ubuntu but in Debian itself and Ubuntu just inherited it, so I had this migrated from Ask Ubuntu


I have been using Linux on and off for 10 years, and more recently I have spent more time with OSX.

But, I still remember that in the beginning I'd choose the US international keyboard layout and it would have exactly the same output as the Windows keyboard layout (and most recently, the OSX US international layout).

However, a few years ago when I installed Ubuntu, I noticed that the cedilla wasn't printed anymore (ç or Ç). This is a combination of the following keys: ' + c. Instead, what I get is the ć letter.

When did it start to happen, and why the difference to the behavior on the other OSes? What puzzles me even more is that there is even an "US International alternative" keyboard layout, which prints exactly the same keys! So, what's it alternative to?

This has been reported as a bug back to Canonical (can't find the link now), but the keyboard layout has never changed back to what I'd expect. I know the workarounds to fix it to what I need, but I just would like to know why/when it has become different.

share|improve this question

migrated from askubuntu.com Feb 16 '11 at 0:54

This question came from our site for Ubuntu users and developers.

1  
You can enter c-cedilla using AltGr + ,. But when/whether/why it changed, I don't know. –  Mikel Feb 8 '11 at 21:20
    
Thanks for the comments. I've flagged the question so it can be moved/merged here. I still believe here is the right place as the behavior seems to have been inherited from Debian. –  pablo Feb 16 '11 at 0:41

4 Answers 4

up vote 11 down vote accepted

Summary

  1. If you are using Ubuntu, it probably changed around 2005, when the default character set changed from ISO 8859-1 to UTF-8.
  2. US Alternative International adds some dead keys.

The dead key settings depend on your locale and character set.

For example:

  • en_US.UTF-8 is defined in /usr/share/X11/locale/en_US.UTF-8/Compose
  • ISO 8859-1 is defined in /usr/share/X11/locale/iso8859-1/Compose

If you look in them using grep, you can see there is a difference:

$ grep '<dead_acute> <c>' /usr/share/X11/locale/en_US.UTF-8/Compose 
<dead_acute> <c>                    : "ć"   U0107 # LATIN SMALL LETTER C WITH ACUTE

$ grep '<dead_acute> <c>' /usr/share/X11/locale/iso8859-1/Compose
<dead_acute> <c>            : "\347"    ccedilla

Namely:

  • Latin1 encoding: ', c = ç
  • UTF-8 encoding: ', c = ć

The git logs ((en_US.UTF-8) (iso8859-1)) show it has been this way since at least 2004.


The difference between US International and US Alternative International is defined in /usr/share/X11/xkb/symbols/us.

Namely, the US Alternative International layout adds these extra AltGr dead keys:

  • dead_macron: on AltGr-minus
  • dead_breve: on AltGr-parenleft
  • dead_abovedot: on AltGr-period
  • dead_abovering: on AltGr-0
  • dead_doubleacute: on AltGr-equal (as quotedbl is already used)
  • dead_caron: on AltGr-less (AltGr-shift-comma)
  • dead_cedilla: on AltGr-comma
  • dead_ogonek: on AltGr-semicolon
  • dead_belowdot: on AltGr-underscore (AltGr-shift-minus)
  • dead_hook: on AltGr-question
  • dead_horn: on AltGr-plus (AltGr-shift-equal)
  • dead_diaeresis: on AltGr-colon (Alt-shift-semicolon)

For example:

  • US International: AltGr+- = ¥
  • US Alternative International: AltGr+-, a = ā

UTF-8 became the default encoding:

share|improve this answer
    
I wish I had more than one vote to give for this answer. –  penguin359 May 3 '11 at 12:01
    
It is worth noting that <dead_acute> <c> is remapped to ç (instead of ć) if your locale is pt_BR. See: /usr/share/X11/locale/pt_BR.UTF-8/Compose –  Denilson Sá May 26 at 21:23

From http://disi.unitn.it/~vitorsouza/linux/ubuntu-linux-10-10-maverick-meerkat/ and http://disi.unitn.it/~vitorsouza/linux/ubuntu-linux-10-04-lucid-lynx/:

Problem with cedilla:

Some nice fellow decided that an accented c (“ć”) is more importante than the c with a cedilla (“ç”), so the default behavior for pressing ‘ + c in international keyboards with deadkeys is now “ć”. Since I’m Brazilian and not Romanian or something, that definetly bothers me. ‘ + c used to output “ç” once upon a time.

To fix it, edit as root the file /usr/lib/gtk-2.0/2.10.0/gtk.immodules, find this line:

"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa"

And add :en after :wa, so it looks like this:

"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en"

Edit for Ubuntu 12.10 (source):

the gtk.immodules file to be edited is located at:

/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/gtk.immodules or /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/gtk.immodules


Edit for Debian Wheezy (and probably other gtk 3 stuff)

The file that needs to be edited is now

/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

The gtk20 in the lines are now gtk30 but adding the :en in the end is just the same.


To fix it also for non-GTK applications, edit as root the file */usr/share/X11/locale/en_US.UTF-8/Compose* and change all instances of ć with ç, and all instances of Ć with Ç.

You might need to repeat one or both operations from time to time, when you upgrade your system and it takes the configuration files back to their original contents.

share|improve this answer
    
To keep the package manager from stepping on your changes, you can run (as root) dpkg-divert /usr/lib/gtk-2.0/2.10.0/gtk.immodules. The package system will then write to gtk.immodules.distrib instead. To undo this, add the --remove flag to the same command and copy the .distrib file over the original. For more info, man dpkg-divert. –  Jander Feb 16 '11 at 3:38
    
in ubuntu 12.10, the file has a different location: /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/gtk.immodules, or /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/gtk.immodules –  cipricus Apr 15 '13 at 14:47

Complementing Vítor Souza answer

Using an US international keyboard layout with OS Language in English and having a beautiful cedilla.

To have English Language with ç/Ç working beautifully ( 'c -> cedilla ) isn't necessary to change the compose files. What one have to do is to set the LC_CTYPE with a locale that contains this definition:

<dead_acute> <c>            : "\347"    ccedilla.

Like pt_BR.UTF-8 (Brazilian Portuguese / Português Brasileiro).

X keyboard map:

# setxkbmap -layout us -variant intl

/etc/locale.conf

# nano /etc/locale.conf
LANG=en_US.UTF-8
LANGUAGE="en_US"
LC_CTYPE=pt_BR.UTF-8

Update locale

# source /etc/profile

And for tty:

Set the right keymap, font and font map, eg.

# nano /etc/vconsole.conf
KEYMAP=us-acentos
FONT=ter-114n
FONT_MAP=8859-1
share|improve this answer
    
OP wasn't asking how to fix it but why it was that way in the first place. Otherwise I'd upvote this. –  strugee Sep 13 '13 at 3:37
    
@strugge, you're right. However the sequels are doing it and relative to OP, Mikel answered it nicely. –  geyslan Sep 13 '13 at 11:59
    
If anyone consider this answer helpful, please set it. –  geyslan Apr 19 at 19:37

This comes as a complement to Vítor Souza's answer.

In Xfce Quantal (Xubuntu 12.10, Mint 14 Xfce) couldn't solve this by the methods already mentioned (see below). What worked was installing ibus package and its dependencies.

(Source - more exactly here.)


The older solution didn't worked for me: in Ubuntu 12.10, the file gtk.immodules has a different location:

/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/gtk.immodules

or

/usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/gtk.immodules

(My source for this here.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.