mathiasbynens / jsperf.com

jsPerf.com source code
http://jsperf.com/
Other
473 stars 56 forks source link

Can't handle UTF-8 in setup function #232

Closed coolaj86 closed 9 years ago

coolaj86 commented 9 years ago

See https://jsperf.com/utf-8-acceptance-test

var str "I'm a ☢ ☃ who speaks 中国语文, loves 𝄢 guitar, and plays in 💩!"

becomes

<script>
  Benchmark.prototype.setup = function() {
    var str = "I'm a ☢ ☃ who speaks 中国语文, loves 
  };
</script>

I changed things a little bit to not include 4-byte utf8 chars, but still couldn't run all of my intended tests: https://jsperf.com/utf-8-encoding-decoding

coolaj86 commented 9 years ago

In case you can't actually see those characters, here are some others:

💩 𐑶 𐐦 🃏 𝄢 𩶘

💩    𐑶    𐐦    🃏    𝄢    𩶘
bnjmnt4n commented 9 years ago

Related to #93.