Didier Ernotte wrote:
> with
>
> var prefs =
> Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("your_extension_name.");
> prefs.setCharPref("your.sub.path.to.pref", "foo");
> and
> var str = prefs.getCharPref("your.sub.path.to.pref");
You should never use get/setCharPref. Never! They will fail for most
non-English languages' characters and special chars like the copyright sign.
Instead, use get/setComplexValue like this:
http://developer.mozilla.org/en/docs/Code_snippets:Preferences#nsISupportsString
Malte
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners