How to use characters with accents on an Ubuntu based OS?
Thread poster: cetian
cetian
cetian
Portugal
Aug 31, 2019

Hello,

Using:
- CafeTran Expresso 10.5 Croissant
- 13.ea OpenJDK 64-Bit Server VM Java
On:
- elementary OS 5.0 Juno 64-bit
Built on:
- Ubuntu 18.04.2 LTS
- Linux 4.15.0-58-generic
- GTK+ 3.22.30

Characters like é, ã, â are not showing up in CafeTran.
The same issue in OmegaT. Installed CafeTran hoping it would work.

Everywhere else (text files, .odt documents, webbrowsers) these characters work perfe
... See more
Hello,

Using:
- CafeTran Expresso 10.5 Croissant
- 13.ea OpenJDK 64-Bit Server VM Java
On:
- elementary OS 5.0 Juno 64-bit
Built on:
- Ubuntu 18.04.2 LTS
- Linux 4.15.0-58-generic
- GTK+ 3.22.30

Characters like é, ã, â are not showing up in CafeTran.
The same issue in OmegaT. Installed CafeTran hoping it would work.

Everywhere else (text files, .odt documents, webbrowsers) these characters work perfectly.
Not in CafeTran.

The keyboard layout (Portuguese_PT) seems to be fine.
In CafeTran the leter "ç" and everything is in its pace, like "!", "?", "º", "+" or "@", which you type with "Alt_gr + 2"like in a standard Portuguese keyboard.

The only thing missing are the accented characters.

How can I fix this?
(thanks in advance)
Collapse


 
Jean Dimitriadis
Jean Dimitriadis  Identity Verified
English to French
+ ...
View > Font Aug 31, 2019

Hello,

I don't know if this will fix the issue, but it's worth giving it a shot.

Have you tried changing the various fonts in View > Font?

I'm using the Ubuntu font, and have no issues with accents.

On another note, I think the latest CafeTran version integrates the 12-ea OpenJDK 64-Bit Server VM. Are you sure yours uses 13? Unless you use an external Java. In that case, make sure you also try starting CafeTran with the provided executable, whi
... See more
Hello,

I don't know if this will fix the issue, but it's worth giving it a shot.

Have you tried changing the various fonts in View > Font?

I'm using the Ubuntu font, and have no issues with accents.

On another note, I think the latest CafeTran version integrates the 12-ea OpenJDK 64-Bit Server VM. Are you sure yours uses 13? Unless you use an external Java. In that case, make sure you also try starting CafeTran with the provided executable, which calls the integrated Java server.

You can find the Java version actually used in CafeTran in Help >About.
Collapse


 
cetian
cetian
Portugal
TOPIC STARTER
Any other suggestions? Sep 1, 2019

Hello and thanks for the reply,

1 - I have tried around 6/7 different fonts, still the same problem
2 - The Java version I saw it inside CafeTran, in the help > about section
3 - I only use CafeTran with the provided executable

Is there any other suggestion?
I would love to use CafeTran, it’s a great interface.
But this makes it unusuable.
What can I do to fix it?


 
cetian
cetian
Portugal
TOPIC STARTER
How can I chose UTF-16? Sep 2, 2019

Hello,

https://stackoverflow.com/questions/4655250/difference-between-utf-8-and-utf-16
In this post, they say, about UTF8:
"Basic ASCII characters like digits, Latin characters with no accents, etc. occupy one byte which is identical to US-ASCII representation. This way all US-ASCII strings become valid UTF-8, which
... See more
Hello,

https://stackoverflow.com/questions/4655250/difference-between-utf-8-and-utf-16
In this post, they say, about UTF8:
"Basic ASCII characters like digits, Latin characters with no accents, etc. occupy one byte which is identical to US-ASCII representation. This way all US-ASCII strings become valid UTF-8, which provides decent backwards compatibility in many cases"

So this is the issue.
How can I chose UTF-16 in CafeTran?
Collapse


 
Jean Dimitriadis
Jean Dimitriadis  Identity Verified
English to French
+ ...
A few pointers Sep 2, 2019

Hello,

I can't help much further at the moment, but here are a few pointers:

---

There should be no need to use UTF-16 for Portuguese and latin-based accented characters. UTF-8 is the way to go. I would not go that route, but you can still give it a try.

If you want to try this, also make sure your Ubuntu installation has UTF-16 enabled. To do this, check the enabled locales with the following command in a terminal window:

locale -
... See more
Hello,

I can't help much further at the moment, but here are a few pointers:

---

There should be no need to use UTF-16 for Portuguese and latin-based accented characters. UTF-8 is the way to go. I would not go that route, but you can still give it a try.

If you want to try this, also make sure your Ubuntu installation has UTF-16 enabled. To do this, check the enabled locales with the following command in a terminal window:

locale -a

Add the following line in the executable (or launch the executable as is, entering the following command in the terminal before):

#!/bin/bash
export LANG=

(the first line is the beginning of the executable, just add "export LANG=" and add the locale you wish to enforce there after the equal sign).

I don't know the particulars of UTF-16, but you would also need to make sure the font you use is UTF-16 compatible.

---

- You said accents work well in other applications EXCEPT in OmegaT and CafeTran which are both Java applications. So it seems the issue is not with CafeTran per se, but with font handling of fonts in Java in your own installation. Omegat also allows setting UI element fonts, so this is the first thing that I suggested. Pity it did not work.

I use a UTF-8 system locale in Ubuntu (which is the default) and do not have any issues with accents (we use them a lot in French).

Such issues that are not globally reproducible are tricky to isolate and troubleshoot. You might need to dig ruther on your own.

Just to be sure, I would still try changing the system (OS) font too. In Gnome Shell (default Ubuntu DE), you can do this in Gnome Tweaks. I don't know how this is done in Elementary OS.


---

Finally, if the developer or another user does not pick up this discussion, consider opening a support ticket (requires registration, which you can use to post in the official forum as well: https://cafetran.freshdesk.com/support/discussions)

https://cafetran.freshdesk.com/support/tickets/new

Be sure to attach a screenshot as well.
---

Best of luck!

Jean


[Edited at 2019-09-02 09:37 GMT]
Collapse


 
cetian
cetian
Portugal
TOPIC STARTER
Help with the command Sep 3, 2019

Hello and thank you so much for all the time you took to answer,

when I type locale -a I get a big list, which includes pt_PT.utf8

I have used ./Cafetran export LANG=PT and it still has the same issue.
I have changed also "look and feel" to GTK and the same problem. Nothing changed.


 
Jean Dimitriadis
Jean Dimitriadis  Identity Verified
English to French
+ ...
Additional info Sep 4, 2019

I've tried CafeTran in a VM with elementary OS 5.0 Juno 64-bit and cannot reproduce the issue. Accents are properly displayed and typed.

Could you post (or try) the following:

- Screenshot of Languages & Regions in System settings. If you see a message that not all localization files are installed, click to install them first.

- Screenshot of the issue in CafeTran. I want to understand exactly how the it presents itself. As I said, I can't reproduce it here
... See more
I've tried CafeTran in a VM with elementary OS 5.0 Juno 64-bit and cannot reproduce the issue. Accents are properly displayed and typed.

Could you post (or try) the following:

- Screenshot of Languages & Regions in System settings. If you see a message that not all localization files are installed, click to install them first.

- Screenshot of the issue in CafeTran. I want to understand exactly how the it presents itself. As I said, I can't reproduce it here. Can you try with another document?

- Two-three examples of words that are not accented.

- The output of the following commands in the Terminal:

locale
localectl status

How to set up system locale in Ubuntu 18.04: https://lintut.com/how-to-set-up-system-locale-on-ubuntu-18-04/

- Just a side note: I've installed Gnome Tweaks, which lets you change the system fonts, in Elementary OS, but the default font is Open Sans. If you haven't changed it, I think it should work.
Collapse


 
cetian
cetian
Portugal
TOPIC STARTER
Issue persists Sep 4, 2019

Hello,

This is what I had:
- Format: pt-PT
- Language: English
- Region: Greece
---------------------------
Because I use the PT keyboard, live in Greece and always use English as a system language.

- After your tips I changed the system language to PT.
- Even before you asked I had tried several different projects and issue persists.
- In the screenshots you have 2 different documents, several words [on the left the correct wor
... See more
Hello,

This is what I had:
- Format: pt-PT
- Language: English
- Region: Greece
---------------------------
Because I use the PT keyboard, live in Greece and always use English as a system language.

- After your tips I changed the system language to PT.
- Even before you asked I had tried several different projects and issue persists.
- In the screenshots you have 2 different documents, several words [on the left the correct word with accents, on the right the incorrect, the target where accents are not recognized]
- You also have the Language and Region settings and the 2 locale commands in terminal

[img]http://imgurl.me/image/tiB7[/img]
[img]http://imgurl.me/image/tP9T[/img]
[img]http://imgurl.me/image/thwz[/img]
[img]http://imgurl.me/image/tGxS[/img]


I never changed the system font.
But since this happened, inside CafeTran I have tried different fonts. Issue persists.

Any clues?
Collapse


 
Jean Dimitriadis
Jean Dimitriadis  Identity Verified
English to French
+ ...
Support ticket Sep 4, 2019

Hello,

Thank you for taking the time to share these screenshots.

Your language settings are fine, there should be no issues, and the default Elementary system fonts are fine as well. As I said, I can't reproduce this on an Elementary OS Juno installation with similar settings.

In screenshots 2 and 3, I find it intriguing that the accents are actually displayed correctly in the source text, both in the Grid and the Source segment editor, but not in the targe
... See more
Hello,

Thank you for taking the time to share these screenshots.

Your language settings are fine, there should be no issues, and the default Elementary system fonts are fine as well. As I said, I can't reproduce this on an Elementary OS Juno installation with similar settings.

In screenshots 2 and 3, I find it intriguing that the accents are actually displayed correctly in the source text, both in the Grid and the Source segment editor, but not in the target segments.

There are one or two things I would try, but at this point, I really think you'd better just create a support ticket. Feel free to give the link to this thread.

Good luck!
Collapse


 
cetian
cetian
Portugal
TOPIC STARTER
Thank you a lot for all the time you took! Sep 4, 2019

https://cafetran.freshdesk.com/support/tickets/54255
(I've alrteady created a ticket, but there they also couldn't figure out what the issue was).

When I have time, I will try Elementary OS from a flash disk, to try if it works. And if it does, maybe do a clean install.

Thank you again for all the time you took trying to help me!


 
Igor Kmitowski
Igor Kmitowski  Identity Verified
Poland
Local time: 01:45
Member (2016)
English to Polish
+ ...
IBus Daemon Sep 5, 2019

On Elementary OS Juno system, you need to start ibus daemon to type Portuguese accents in some applications. You should be able launch it via Applications > IBus Preferences or just type the following command in the Terminal:

ibus-daemon --xim

You might also add the above terminal command as the Startup Application to start it automatically along with the system.


cetian
 
cetian
cetian
Portugal
TOPIC STARTER
Solved! Sep 14, 2019

Thank you so much for your help!
After starting iBus and removing the ENG input method and leaving the PT one, it works!

https://imgur.com/a/KJLuesr

[you can close the thread, it's solved]


 


To report site rules violations or get help, contact a site moderator:

Moderator(s) of this forum
Natalie[Call to this topic]

You can also contact site staff by submitting a support request »

How to use characters with accents on an Ubuntu based OS?






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »