Encryption Service - broken characters |
Hello guys, I need help with the problem what i got.
When using the Encryption service and encrypt some data i always got improperly encoded characters. For example Code: <a href="" charset="UTF-8" data-text="<?= $encrypter->encrypt(10) ?>">test</a> Code: <a href="" charset="UTF-8" data-text="�c�NK���a�ǃ���:�0��8�m���v��C7��M�Y���v]s*���BL��t��M��Y����<c����I1�1�z�">test</a> I´m using CI4 rc3 with config set to utf-8,PHP 7.2.26 running on localhost, developing in php storm which encoding is set to utf-8. I tried output to log, print on screen, insert to db and i always a got broken chars. Thank you very much for help.
I think you need to base64 encode and decode it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-30-2020, 01:33 AM)TonyC Wrote: Hello guys, I need help with the problem what i got. You need to convert the binary string that encryption outputs into hex. base64_encode and its compliment base64_decode is one solution. The other solution is to use the complementary functions bin2hex and hex2bin Read the docs for more |
Welcome Guest, Not a member yet? Register Sign In |