On Thu, Oct 11, 2012 at 2:03 PM, Johnny Stenback <j...@mozilla.com> wrote:

> Excellent question. This is something that has been discussed before
> (there was a discussion at the previous DOM/WebAPI work week about
> this), and it's my personal belief that having the DOM use anything
> other than what JS requires, i.e. UTF-16 (or UCS2, really), is a
> non-starter from a performance point of view.
>

On the other hand, for every part of the engine except JS, UTF8 is ideal.

I think it's worth investigating supporting UTF8 strings in the JS engine.
One option: the first time someone calls charAt() or similar on the string,
build an auxiliary UTF16 copy of the string and keep it around.

Rob
-- 
“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to