I don't understand whenever I save any string that contains ñ it changes to ñ. Even in the database the ñ is changed to ñ.
Examples:
I don't have any clue what causes this problem or where the problem is coming from. Please help. Thanks in advance.
Character ñ
(U+00F1) is encoded using UTF-8 as the two bytes 11000011 10110001
(0xC3 0xB1
).
These two bytes are decoded using ISO 8859-1 as the two characters ñ
.
So, you are most likely using UTF-8 to encode the character as bytes, and ISO 8859-1 (Latin-1, as guessed by Sajmon) to decode the bytes as characters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With