From 38e42e42981fc44ad788fef847e96bb3e3d536fa Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Tue, 28 Jul 2009 23:31:05 +0000 Subject: linux plugins: assume UTF-8 for plugin name/description Saw this on my Jaunty machine; plugin name included a copyright symbol. Review URL: http://codereview.chromium.org/159546 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21921 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/plugin_lib_linux.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'webkit') diff --git a/webkit/glue/plugins/plugin_lib_linux.cc b/webkit/glue/plugins/plugin_lib_linux.cc index a390918..e27c999 100644 --- a/webkit/glue/plugins/plugin_lib_linux.cc +++ b/webkit/glue/plugins/plugin_lib_linux.cc @@ -45,6 +45,9 @@ bool PluginLib::ReadWebPluginInfo(const FilePath& filename, std::vector descriptions; SplitString(mime_description, ';', &descriptions); for (size_t i = 0; i < descriptions.size(); ++i) { + if (descriptions[i].empty()) + continue; // Don't warn if they have trailing semis. + std::vector fields; SplitString(descriptions[i], ':', &fields); if (fields.size() != 3) { @@ -70,12 +73,12 @@ bool PluginLib::ReadWebPluginInfo(const FilePath& filename, const char* name = NULL; NP_GetValue(NULL, nsPluginVariable_NameString, &name); if (name) - info->name = ASCIIToWide(name); + info->name = UTF8ToWide(name); const char* description = NULL; NP_GetValue(NULL, nsPluginVariable_DescriptionString, &description); if (description) - info->desc = ASCIIToWide(description); + info->desc = UTF8ToWide(description); } return true; -- cgit v1.1