Sunday, April 15, 2007

Hindi/Marathi/Sanskrit Transliteration on Blogger.com !

So finally they did it. Now blogging in India's National language (Hindi), Marathi and Sanskrit has become even more easy. Great job guys !

Many may find a problem FireFox and Devanagari script. FireFox doesn't seem to render joined Devanagari letters correctly, at least on Windows. IE works just fine.

For example,

Entering 'kya kar rahe ho. ' in the blogger.com's post editor window in FireFox gives this:





Where as it should give this:




The correct output is from IE. Both browsers were set to UTF-8 Encoding. The above problem can be seen for words like 'hindi'. Here again FireFox fails to render the correct output.

I found a solution which I am yet to try out here:
http://marathiblogs.net/font_problem

Also one more piece of advice that I would like to give Google, is to make transliteration tools available on their website. Adding spell-check is also a great idea (am I asking for too much).

For more on Transliteration tools for Indian Languages:
http://ashishware.com/Transl.shtml

Wednesday, April 11, 2007

Code for JSON DataSet Deserialization in

My typed DataSet looks like this:









This method is in code behind

[WebMethod]
public static MyDS GetDataFromServer()
{
MyDS d = new MyDS();
d.MyTable.AddMyTableRow("1", "abc");
return d;

}



The following lines are from aspx page accessing the service:

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods=true>
<Services>
<asp:ServiceReference Path="Common\TestService.asmx" />
</Services>
</asp:ScriptManager>



Given below is the javascript code:

<script type="text/javascript" language="javascript">

function OnLookupComplete(result, userContext)
{
//Accessing typed dataset using column names
alert(result.tables[0].rows[0].ID);
alert(result.tables[0].rows[0].Name);
}

function OnError(result)
{
alert("Error: " + result.get_message());
}
function init()
{
debugger; //start debugging
TestService.GetDataFromServer(OnLookupComplete,OnError);
}

</script>


It is called on body.onload

<body onload="init();">