I found out that IOS 11 added a new feature called smart punctuation that needs to be disabled in order to use special characters like quotes, dashes, apostrophes when entering passwords etc. Go to settings, general, keyboard and turn off smart punctuation. You can turn it back on if you like after entering the password.