Does anyone have a solution for this problem? It could quite possibly be the case that my password contains umlauts since these are close on my keyboard to some of the characters i assume are contained in the password.
You need to identify the character set used to encode the password. It may be different than the character set used to encode the font displayed by the terminal program and different from the character sett used to store the text of your program in a file.
http://en.wikipedia.org/wiki/Western_Latin_character_sets_(computing)
Those are your basic choices. Note that the Unicode column can have several different encodings: UTF-7, UTF-8, UTF-16LE, UTF-16BE or UTF-32 (unlikely, but possible; and it still has big-endian and little-endian variants).
Good luck.