mathiasbynens/jsperf.com

Can't handle UTF-8 in setup function

Closed this issue ยท 2 comments

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

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

๐Ÿ’ฉ ๐‘ถ ๐ฆ ๐Ÿƒ ๐„ข ๐ฉถ˜

๐Ÿ’ฉ    ๐‘ถ    ๐ฆ    ๐Ÿƒ    ๐„ข    ๐ฉถ˜

Related to #93.