Wrong charcode in indicator-applet

Bug #718075 reported by Anrew Andreyuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Thunderbird Indicator
New
Undecided
Unassigned

Bug Description

I use Thunderbird with Russian localization. When I received mail-message, indicator-applet show me ">40IB (mymail@server) (1)". First word is "Inbox" in wrong char-code in russian. My Inbox folder in Thunderbird have name in Russian language. I corrected file overlay.js for Unicode encoding. Now it work.

I changed function indicatorLabel:

indicatorLabel: function (folder) {
  var string=folder.prettiestName
  if(typeof(string)!="undefined"&&string!=null)
  {
   string = string.replace(/\r\n/g,"\n");
   var utftext = "";
   for (var n = 0; n < string.length; n++)
   {
     var c = string.charCodeAt(n);
    if (c < 128)
    {
     utftext += String.fromCharCode(c);
    }
    else if((c > 127) && (c < 2048))
    {
     utftext += String.fromCharCode((c >> 6) | 192);
     utftext += String.fromCharCode((c & 63) | 128);
    }
    else
    {
     utftext += String.fromCharCode((c >> 12) | 224);
     utftext += String.fromCharCode(((c >> 6) & 63) | 128);
     utftext += String.fromCharCode((c & 63) | 128);
    }

   }
  }
  return utftext +" ("+folder.rootFolder.prettiestName+")"; // return prettiestName in Unicode
        }

Tags: localization
Revision history for this message
Anrew Andreyuk (adasiko) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.