When I encode a character to base64, I get different results depending on the the way I pass the character:
For example, I want to encode chr(128)
=> €
1.passing the result of chr()
: base64_encode(chr(128))
=> 'gA=='
2.passing the character directly: base64_encode('€')
=> '4oKs'
Why are the results different?