How can I tell what the character encoding of a string of text is?

0

Troubleshooting an irritating password issue. There's an application we are using that requires a login; I type in the password, it tells me it's wrong.

If I open a password manager and copy and paste the password in from that, even though it's the same text and I've checked there are no invisible spaces included, the pasted password works.

I'm wondering if there is a specific character encoding being evaluated by the application and the character encoding is preserved in the password manager, but not when I'm typing in the password manually.

Is there a utility or method that can be used to determine if there's a difference between the text I'm entering and the text being pasted, including the encoding?

The platform is Windows Server 2008R2 and Windows 7.

Bart Silverstrim

Posted 2015-01-12T14:09:07.577

Reputation: 1 755

2Its not possible just from a bunch of characters to tell what encoding was used. Sounds like you should consider just changing the password. – Ramhound – 2015-01-12T14:14:27.067

Okay, from what I can find the encoding doesn't happen until text is saved or pasted into an application...so encoding isn't inherent to the string of text. I'm dealing with Schrodinger's Text. – Bart Silverstrim – 2015-01-12T14:40:44.007

So what is your question? It sounds like your actual question is to determine what character encoding of the passwords for the application you are using. – Ramhound – 2015-01-12T14:51:46.600

It is still the question of a method to determine if what I'm entering into the password textbox is the same as the text I'm pasting into the textbox, if possible. – Bart Silverstrim – 2015-01-12T14:53:02.653

From what I've found while continuing to research, I think the wording (or the path I was taking in solving the problem) is wrong...I don't know if the question should be deleted or reworded, since it's been educational and I'd like to see it documented, but totally misleading in what can be done in this case. – Bart Silverstrim – 2015-01-12T14:55:18.850

Your not going to be able to determine the encoding of the stored password of either application without the source and/or specific application specifications. – Ramhound – 2015-01-12T14:55:37.420

You're right, it would require more details than I've fully shared here. BUT I think this particular case I may have found a clue of what's actually happening. It's so particular, I don't know if it would be of help to the public. I'm going to document in a personal blog post and probably delete the question! THANK YOU! – Bart Silverstrim – 2015-01-12T14:58:26.143

Why don't you just answer the question? You can then help everyone in the community. – Ramhound – 2015-01-12T15:06:32.290

Once I get it fully sorted I'll post an answer and see if the wording can be changed so it's more appropriate and discoverable. – Bart Silverstrim – 2015-01-12T15:10:48.040

Editors such as Notepad++ allow different encodings. One issue may be that BOM is turned on or off in settings, as well as setting the encoding scheme itself. See http://stackoverflow.com/questions/2223882/whats-different-between-utf-8-and-utf-8-without-bom

– DrMoishe Pippik – 2015-01-12T18:34:18.290

Answers

0

The question I was seeking was a way to find out what kind of data was being copy/pasted versus what I manually typed into a text box for a login to an application.

The solution I found was ClipSpy, which shows a definite change in the way data is stored in the clipboard from where the password was being stored to the RDP session where it was being entered.

Example on text source

Here's the VM where I entered some example text, then in the RDP session the same clipboard content showed up as:

That's strange

I'm wondering if the Tomcat-based application accepting the password is taking encoding into account when doing the password comparison, and that's why the pasted password works while the manually typed password doesn't. I'm not sure how the password comparison is implemented so I don't know how I could further test that theory, but ClipSpy answered at least part of the main question of determining if there's any changes in encoding content of the clipboard.

Bart Silverstrim

Posted 2015-01-12T14:09:07.577

Reputation: 1 755