UTF-8 in window title

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UTF-8 in window title

daniel-435
Hello everyone,

I like to use a string containing UTF-8 characters as a window title for
my XUL application:

   document.title = whatever;

But the title just shows question marks for those characters which are
not ASCII compatible. I saw that Thunderbird's mail editor is also using
the title setter in the same way, but has no problem displaying UTF-8
characters.

Do I need to do more? Is it maybe a font problem? I appreciate any tipps
and hints.

Thanks,

Daniel
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: UTF-8 in window title

Neil-4
daniel wrote:

> I like to use a string containing UTF-8 characters as a window title
> for my XUL application:
>
>   document.title = whatever;

JavaScript uses UTF-16, not UTF-8. If your string contains UTF-8
characters because e.g. it was read from a file, you will need to
convert that to UTF-16 first, or use a different way of reading the file
that gives you UTF-16 directly.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul