LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Characters being changed when pasted from Keepass (https://www.linuxquestions.org/questions/linux-mint-84/characters-being-changed-when-pasted-from-keepass-4175597082/)

beachboy2 01-10-2017 09:10 AM

1 Attachment(s)
paxolin,

TIP:
Highlight the text you wish to put in CODE tags and click on # above the text box. It makes it so much easier for others to read and for you to improve your chances of receiving a reply.

To save further messing about, I recommend that you reset and reconfigure your locales using Terminal:


Code:

sudo locale-gen en_GB.UTF-8
sudo dpkg-reconfigure locales

Use the Down arrow on the keyboard until you reach:

en_GB.UTF-8 UTF-8

There should already be an asterisk (*) next to it:

[*] en_GB.UTF-8 UTF-8

so there is no need to use the spacebar to select it. (see attached screenshot).

If you touch the spacebar, then you will remove the asterisk!

Click on Tab (above Caps Lock) to highlight OK and press Enter.

This time en GB.UTF-8 is highlighted.

Press Tab and Enter as before, then exit Terminal.


Your locale should look like this:

Code:

$ locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
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=

Many of your locale settings are missing the quotation marks for some reason.

My /etc/default/locale is:
Code:

LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_IDENTIFICATION=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


*The above file is accessed via:

Code:

gksudo gedit /etc/default/locale
OR
Code:

sudo nano /etc/default/locale
I would stick to reconfiguring your locale for now.

NB First of all, you may well need to install gedit and gksu by:

Code:

sudo apt-get update
sudo apt-get install gedit gksu

If you are not familiar with nano then you can research that later.

paxolin 01-10-2017 08:23 PM

beachboy2
Thank you so much for your post.

As I’m really struggling to understand any of this, it is just what I need - pedantic details explaining everything (I mean that as a compliment).
You explained how to highlight code in detail. Someone before said to enclose it with # - so I did that literally (typed one before and one after the code), but didn't know about highlighting it and the advanced editor with the # feature in it. Well I do now!

Back to the main subject.
I saw your NB and installed gedit and gksu first - whatever they are.
Followed the instructions carefully. It was definitely en_GB.UTF-8 that I selected, then there was a message saying it was processing my request.
After that I looked at locale, but it looks the same as before – only three items within quotation marks. See below.
(Out of interest I saw you included your locale in your post, but there are no quotation marks at all in yours?)


Code:

LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_GB.UTF-8"
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=


I did restart Mint in case that was needed, but it made no difference.
Should I run the entire process again? Or have I missed something somewhere?

beachboy2 01-10-2017 11:13 PM

2 Attachment(s)
paxolin,

Quote:

...it is just what I need - pedantic details explaining everything (I mean that as a compliment).
That's okay then!

Your locale output looks fine.

The locale command giving certain output and the /etc/default/locale file are two different animals.

The /etc/default/locale contains no quotation marks, whereas the locale does.

gedit and nano are text editors and they are used to operate on the /etc/default/locale file amongst others.

Just as a matter of interest, give this command in Terminal:

Code:

gksudo gedit /etc/default/locale
Do NOT make any changes to the /etc/default/locale file!

Simply copy and paste the file contents into CODE tags in your reply and click on the X (top right corner) to close the file.

If the file contents match mine, I suspect that there may be some LibreOffice settings that need changing.

I seem to recollect that another LQ member made reference to the input settings?

Click on Menu > Preferences > Languages/Input method to view these two.

Do NOT change them or add anything!

I am attaching screenshots of my two.

paxolin 01-10-2017 11:31 PM

Quote:

Originally Posted by beachboy2 (Post 5653184)
paxolin,



That's okay then!

Your locale output looks fine.

The locale command giving certain output and the /etc/default/locale file are two different animals.

The /etc/default/locale contains no quotation marks, whereas the locale does.

gedit and nano are text editors and they are used to operate on the /etc/default/locale file amongst others.

Just as a matter of interest, give this command in Terminal:

Code:

gksudo gedit /etc/default/locale
Do NOT make any changes to the /etc/default/locale file!

Simply copy and paste the file contents into CODE tags in your reply and click on the X (top right corner) to close the file.

If the file contents match mine, I suspect that there may be some LibreOffice settings that need changing.

When you mentioned that some of my locale settings were missing quotation marks, I thought that's what the last editing session was to amend?

So it's a different locale (file) that's been changed then?
This is the result of the command you listed above:

Code:

LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_IDENTIFICATION=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

Is that correct?
Can I ask why you say it might be a Libre Office issue? How does that enter into copy & pasting from KeePass into Firefox?

beachboy2 01-10-2017 11:41 PM

paxolin,

I think somebody else needs to provide some suggestions for solving this.

Having saved your KeePass2 database to an external drive or similar, it may be an idea to totally remove KeePass2 and then reinstall it using the PPA.

I am out of ideas.

paxolin 01-10-2017 11:56 PM

Quote:

Originally Posted by beachboy2 (Post 5653191)
paxolin,

I think somebody else needs to provide some suggestions for solving this.

Having saved your KeePass2 database to an external drive or similar, it may be an idea to totally remove KeePass2 and then reinstall it using the PPA.

I am out of ideas.

Actually I have already been down the PPA path & d/loading it from https://launchpad.net/~jtaylor/+archive/ubuntu/keepass. It was yourself who gave me the information on how to do that in the previous thread I had on KeePass2.

Not to worry, I am really, really appreciative of your help - especially in clear-no-jargon-English!!

I'll wait to see if anyone else has any ideas.

beachboy2 01-11-2017 12:06 AM

paxolin,

I am sorry that I cannot think of a solution to this problem.

On the plus side, you have learned a bit more about using Linux, so it is not all bad news.

Good luck.

pan64 01-11-2017 12:11 AM

just a question: this drag&drop works with other apps or the same thing happens with any of them?
you can try geany, gedit, or any other gui or terminal to check it.

beachboy2 01-11-2017 12:25 AM

paxolin,

Quote:

I suspect that there may be some LibreOffice settings that need changing.

I seem to recollect that another LQ member made reference to the input settings?
I was getting mixed up with another post regarding the Burmese language!

paxolin 01-11-2017 12:30 AM

Quote:

Originally Posted by beachboy2 (Post 5653202)
paxolin,



I was getting mixed up with another post regarding the Burmese language!

It's right next door to Thailand, so therefore understandable as you're miles away in Wales!

paxolin 01-11-2017 01:29 AM

Quote:

Originally Posted by pan64 (Post 5653200)
just a question: this drag&drop works with other apps or the same thing happens with any of them?
you can try geany, gedit, or any other gui or terminal to check it.

That's a difficult question.
I'm trying the think of another program I have that uses drag and drop. Unless you can suggest one that's commonly available, I don't think I have one.

If it's terminal you're suggesting, I just don't know what to do. So far I just blindly follow instructions posted on here (like locale in earlier posts), as I have no understanding of it sadly.

beachboy2 01-11-2017 03:38 AM

paxolin,

You could try installing and using one of these browsers and see whether you still get the Chinese characters.

You can always uninstall them if it makes no difference.

Try QupZilla first.

QupZilla:
http://www.qupzilla.com/

Code:

sudo apt-get update && sudo apt-get install qupzilla
Chromium:

Code:

sudo apt-get update && sudo apt-get install chromium-browser
Midori:
http://midori-browser.org/

Code:

sudo apt-add-repository ppa:midori/ppa && sudo apt-get update -qq && sudo apt-get install midori
Opera:
http://www.opera.com/download/guide/?os=linux

paxolin 01-11-2017 04:48 AM

Quote:

Originally Posted by beachboy2 (Post 5653244)
paxolin,

You could try installing and using one of these browsers and see whether you still get the Chinese characters.

You can always uninstall them if it makes no difference.

Try QupZilla first.

QupZilla:
http://www.qupzilla.com/

Code:

sudo apt-get update && sudo apt-get install qupzilla
Chromium:

Code:

sudo apt-get update && sudo apt-get install chromium-browser
Midori:
http://midori-browser.org/

Code:

sudo apt-add-repository ppa:midori/ppa && sudo apt-get update -qq && sudo apt-get install midori
Opera:
http://www.opera.com/download/guide/?os=linux

Right, first thanks for not giving up on this! That was a good idea to suggest a different browser.

I installed the one called Qupzilla. It seemed OK initially, so I persisted:

Qupzilla - twenty times I dragged & dropped into the Gmail login. Worked every time. Then without closing that browser, I did the same with my existing Firefox v50.1.0. That failed on the fourth attempt with drag & drop, pasted the good old Chinese characters again.

Second try: Qupzilla twenty times OK, Firefox failed on attempt number six.

It does look pretty conclusive at the moment it's Firefox causing the error. Btw, I use Firefox on Windows 7, never any problems with that though. Wonder what it is causing that? I have Text Encoding>Auto Detect <off>.

beachboy2 01-11-2017 05:51 AM

paxolin,

Signs of success at last!

pan64 01-11-2017 05:54 AM

probably you can find here something
firefox->edit->preferences->content->languages->choose


All times are GMT -5. The time now is 01:03 AM.