[Project_owners] nsIScriptableUnicodeConverter throws NS_ERROR_UCONV_NOCONV (0x80500001)

Peter B. Shalimoff vshalim at home.ru
Fri Feb 10 12:20:41 EST 2006

Hi all.

I've received a bug report recently:
<quote src="http://pagebookmarks.mozdev.org/notes.html#c21">
Error: uncaught exception: [Exception... "Component returned failure
code: 0x80500001 [nsIScriptableUnicodeConverter.charset]" nsresult:
"0x80500001 ()" location: "JS frame ::
chrome://pagebookmarks/content/pgbm-xml_helpers.js :: loadXMLDocument ::
line 80" data: no]

Source code is available at

I have a clean install of localized Russian Win98 SE. I installed
Firefox (Gecko/20060111), then installed my extension and tried
to reproduce that bug, but everything works fine.

There are two places in code where converter's 'charset' property is set.
One is in pgbm-XMLBookmark.js, just after creating a converter instance,
and the other is in pgbm-xml_helpers.js when loading XML document. There
is no exception thrown in the first place, but there is in the second one.
In brief:

=== pgbm-ovr.xul ===
<script ... src="pgbm-XMLBookmark.js"></script>
<script ... src="pgbm-xml_helpers.js"></script>

=== pgbm-XMLBookmark.js ===
const uc = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]

// class Bookmark;
function Bookmark() { ... }

// No exception at this point.
uc.charset = Bookmark.XML_DOCUMENT_CHARSET;

=== pgbm-xml_helpers.js ===
function loadXMLDocument() {
  // This is where exception is thrown.
  uc.charset = Bookmark.XML_DOCUMENT_CHARSET;

Any ideas what's wrong and how to fix that?


More information about the Project_owners mailing list