Comment 93 for bug 518056

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2015-03-31 17:15, Leandro wrote:
> First, I tried to apply the pt_BR.UTF-8 locale (using export
> LC_CTYPE="pt_BR.UTF8") but the language pack was not installed,
> therefore the workaround would only work after installing the
> language pack, probably that will create the same kind of confusion
> that the workarounds create now.

Actually it's not necessary that the language packs are installed, but the locale needs to be generated. If you set a Brazil location for the time zone in the installer, you'll end up with "pt_BR.UTF-8" generated to begin with, so in those cases there shouldn't be a reason for user confusion.

Otherwise the locale can be generated either by installing the Brazilian Portuguese language via Language Support or by running this command:

sudo locale-gen pt_BR.UTF-8

> Anyway, I installed it, and then I could export the LC_CTYPE. I
> launched a session of gedit and within that gedit session the ç
> appeared correctly. However, at the same terminal from where I
> launched gedit the cedilla continued to appear as an accented "c",
> and the same for new terminals launched from that terminal. That is,
> changing the LC_CTYPE environment variable did not work system-wide.

Let me guess: You exported LC_CTYPE in a terminal window and then launched gedit from there. That doesn't work for me either.

One way to test it properly is to edit your ~/.profile file by adding this line:

  export LC_CTYPE=pt_BR.UTF-8

and then log out and log in again.

For me it works in the terminal, in gedit, in LibreOffice, and in HTML forms in Firefox.

> At the same time, although there could a combination of
> Language/Region/Keyboard that provided the correct behaviour, I am
> not sure if forcing a specific language for the interface is a
> reasonable solution to that problem.

But we wouldn't force the display language. The LC_CTYPE environment variable would get its value automatically through either of these options:

* Set Brazilian Portuguese as the display language, OR

* Set Brazilian Portuguese as the regional formats.

Both those are controlled via the Language Support GUI, so the user wouldn't need to open a terminal window to fix it.

In addition to that, if you don't want to have Brazilian Portuguese as the display language or the regional formats setting, you can export LC_CTYPE manually in ~/.profile as shown above.

And, again, if the user sets a Brazil location for time zone when installing, the regional formats will be Brazilian Portuguese automatically.

Please note that these things work differently today compared to how it worked when you filed this bug report five years ago. ;)