You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. run Crypto.SHA256("á") in firebug
What is the expected output?
fb9778719d93551b1c88df5f1ab229f83ea30af112fc51017c9f0a383dcf6cb3
What do you see instead?
eb3e85d7fbf56104c8021681e68d771b9b9205b93e9219c8f81f60af703de381
What version of the product are you using?
2.0.0
On what operating system?
Mac/Chrome 7
Original issue reported on code.google.com by key...@gmail.com on 17 Nov 2010 at 3:25
The text was updated successfully, but these errors were encountered:
When you write non-ASCII characters directly into your page source, you need to
make sure you use a meta tag to set the charset. To see the difference it
causes, consider these two sources below.
/* No META charset */
<script type="text/javascript"
src="http://crypto-js.googlecode.com/files/2.0.0-crypto-sha256.js"></script>
<script type="text/javascript">
var m = "á";
alert(m.length); // alerts 2
alert(Crypto.SHA256(m)); // alerts
eb3e85d7fbf56104c8021681e68d771b9b9205b93e9219c8f81f60af703de381
</script>
/* Has META charset */
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript"
src="http://crypto-js.googlecode.com/files/2.0.0-crypto-sha256.js"></script>
<script type="text/javascript">
var m = "á";
alert(m.length); // alerts 1
alert(Crypto.SHA256(m)); // alerts
fb9778719d93551b1c88df5f1ab229f83ea30af112fc51017c9f0a383dcf6cb3
</script>
Original comment by Jeff.Mott.OR on 17 Nov 2010 at 5:21
Original issue reported on code.google.com by
key...@gmail.com
on 17 Nov 2010 at 3:25The text was updated successfully, but these errors were encountered: