summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 00:07:51 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 00:07:51 +0000
commit68bf60380800cbd4210f32433ec0310aa8646da2 (patch)
tree8e1854974d25404dea3ab2e72baef9f43bc6a60d /tools
parentfc296c02aa9de1d144779944f4d0081e273329f2 (diff)
downloadchromium_src-68bf60380800cbd4210f32433ec0310aa8646da2.zip
chromium_src-68bf60380800cbd4210f32433ec0310aa8646da2.tar.gz
chromium_src-68bf60380800cbd4210f32433ec0310aa8646da2.tar.bz2
Convert webkit_glue::GetLocalizedString to return a string16
instead of a wstring. Convert the linux data pack files to pack message strings as utf16 instead of utf8. Review URL: http://codereview.chromium.org/20060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/grit/grit/node/message.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/grit/grit/node/message.py b/tools/grit/grit/node/message.py
index 66afa64..5ae1162 100644
--- a/tools/grit/grit/node/message.py
+++ b/tools/grit/grit/node/message.py
@@ -183,8 +183,10 @@ class MessageNode(base.ContentNode):
id = id_map[self.GetTextualIds()[0]]
message = self.ws_at_start + self.Translate(lang) + self.ws_at_end
- # |message| is a python unicode string, so convert to a utf8 byte stream.
- return id, message.encode('utf8')
+ # |message| is a python unicode string, so convert to a utf16 byte stream
+ # because that's the format of datapacks. We skip the first 2 bytes
+ # because it is the BOM.
+ return id, message.encode('utf16')[2:]
# static method
def Construct(parent, message, name, desc='', meaning='', translateable=True):