LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-06-2009, 04:24 AM   #1
jadas
LQ Newbie
 
Registered: Dec 2007
Posts: 14

Rep: Reputation: 0
How to input non-utf characters from utf-8 linux enviroment?


Recently I tried to open a password protected pdf under Mandriva linux, but even though I knew the password it didn't work. In Windows worked just fine. So, I came to the conclusion that the password was created under windows which uses iso-8859-* or windows-125*(the password uses local characters not latin), and adobe reader can't properly convert utf-8 characters from my keyboard so I can open the pdf.
Is there any way to input iso-8859-* or windows-125* only to adobe reader without changing my whole system's encoding?

Thanks in advance,
Jadas
 
Old 02-06-2009, 04:41 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
A) You might try starting acroread in konsole after changing the encoding of the terminal.

B)
Code:
iconv -f UTF-8 -t UTF-16 <(echo 'abc#$%%^')
��abc#$%%^
jschiwal@qosmio:~/547968> iconv -f UTF-8 -t UTF-16 <(echo 'abc#$%%^') >tempfile
jschiwal@qosmio:~/547968> file tempfile
tempfile: Little-endian UTF-16 Unicode character data, with no line terminators
You could echo the password through iconv and then copy & paste it into the dialog.

C) Try both.

I'm not sure which LC_ variable it would be but you can precede a command, setting a variable, as in "LC_LANG=en_US acroread /path/to/file.pdf". Also, the acroread command is a bash wrapper for the real command. There are a number of locale variables used in the script, so I'm sure that acroread uses them. I didn't see anything trying "acroread -help".

If a character doesn't translate from one encoding to another, iconv can't convert the text, however if y ou change the encoding of the terminal, and then echo it, I think if you cut and paste the characters echoed, the byte by byte values may be the same.

Last edited by jschiwal; 02-06-2009 at 06:03 AM.
 
Old 02-06-2009, 07:13 AM   #3
jadas
LQ Newbie
 
Registered: Dec 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the answer but nothing worked. I changed konsole's encoding but I couldn't echo non latin characters. The other methods just start adobe reader but don't accept the password
 
Old 02-06-2009, 07:29 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
What kind of characters where used in the password. Any accented characters. You can add a keyboard layout. For example, add another US layout, and select "alt-int" variant, and then change the label (usi for example).

Which encoding was used for the password. (e.g. ISO_8859-1)

I don't work with encodings much. There may be xorg settings that would do it.
 
Old 02-06-2009, 04:21 PM   #5
jadas
LQ Newbie
 
Registered: Dec 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Changing layouts didn't help. Password is encoded in iso-8859-7.
 
Old 02-07-2009, 04:55 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I looked at "localedef --list-archive" and the only iso8859-7 values listed where el_CY.iso88597 and el_GR.iso88597.

Try "LANG='el_CY.iso8859-7' LC_ALL='el_CY.iso8859-7' LC_CTYPE='el_CY.iso8859-7'

You might need to change your language, locale and keyboard settings. Perhaps you could create a new user and select that language when you log in as the new user.
 
Old 02-07-2009, 03:20 PM   #7
jadas
LQ Newbie
 
Registered: Dec 2007
Posts: 14

Original Poster
Rep: Reputation: 0
That command worked! Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting UTF-16 files to another encoding (such as UTF-8) crisostomo_enrico Solaris / OpenSolaris 3 03-25-2008 05:30 PM
im getting UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1' jabka Linux - Newbie 2 11-24-2006 05:44 AM
How do I know how a file is encoded? UTF-8, UTF-16, etc.. ?? brynjarh Linux - General 1 12-03-2004 11:11 AM
[Enter] in text documents diffrent on Windows and Linux? UTF-8/UTF-16 problem or? brynjarh Linux - General 1 11-24-2004 05:20 AM
X11 / UTF-8 locale seems missing 'fr_FR.UTF-8' chrsitophermann Debian 11 07-17-2004 02:04 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration