Platinum Partner

Change Gmail Encoding To Display Thai.

Some emails send from yahoo and hotmail will display thai incorrectly. This bookmarklet re-encode it by shifting the unicode numbers. Can be applied to some language whose encoding is in the same "shifting" order.

javascript:(function(){  map=[];for(i=161;i<251;i++)map[i]=String.fromCharCode(i+3424);  function thai(s){s2='';for(var i=0;i160&&n<251) s2+=map[n];else s2+=s.charAt(i)}return s2}   function rc_thai(el){if(el.nodeType== 3){el.data=thai(el.data);return} if(el.tagName == 'SCRIPT') return; for (var i=0; i
The one-liner version above maybe difficult to read.
Here's a reorganized one

javascript:(function(){
map=[];
/* create conversion table */
for(i=161;i<251;i++) {
  map[i]=String.fromCharCode(i+3424);
}

function thai(s){
  s2='';
  for(var i=0;i160&&n<251) 
      s2+=map[n];
    else 
      s2+=s.charAt(i)
  }
  return s2
}   

/* recursively convert encoding of sub-element */
function rc_thai(el){
  if(el.nodeType== 3){
    el.data=thai(el.data);
    return
  } 
  if(el.tagName == 'SCRIPT') 
    return; 
  for (var i=0; i
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}