I have a line that contains some utf-8 characters, such as "abc 艾", and found that php5 sha1 is generating different code compared to Javascript sha1, can anyone help me with this? Thanks in advance.
phpcode:
$str = "abc艾"; $result = sha1($str);
result 5345129746e444693aa1111c5840e4b57236f002
Javascript code:
var str = "abc艾" var result = sha1(str)
result 8a2aa0fed185dcffb922b1c4d67a49105525bd6a
source share