kripken/emscripten — pull request #1629 by ngld (2013-09-17 19:38:54+00:00)
Title: Fix ccallFunc to properly support UTF-8 strings

As pointed out in #1166, ccallFunc fails to calculate the required amount of memory for a string, if it contains non-ascii characters. I fixed it by converting the string into an array, then writing that array into memory. That's basically the same writeStringToMemory() does but I can use the array length to determine the necessary memory.