C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




unicode charachters


Posted Date: 08 Aug 2008      Total Responses: 1

Posted By: magda refaat       Member Level: Bronze     Points: 1


I used arabic charachter in windows application using vb.net without saving the file as unicode . how can solve this problem



Responses

Author: fayaz    08 Aug 2008Member Level: GoldRating:     Points: 1
You'd have to use Globalization and also set the proper Culture for other things in WIndows (like dates, measurements, etc).


<%@ import namespace="System.Globalization" %>
<%@ import namespace="System.Threading" %>
<%@ import namespace="System.Resources" %>
<%@ import namespace="System.IO" %>


public override CultureInfo Parent
{ get { return new CultureInfo(this._parent); } }

public CustomGuamCulture(string parent, string customLanguageCode,string formalName) : base(parent)
{
this._parent = parent;
this._name = string.Format("{0}-{1}", parent, customLanguageCode);
this._description = string.Format("Custom culture ({0})", formalName);
}


protected void Page_Load(object sender, EventArgs e)
{
CultureInfo ci;

switch (Radiobuttonlist1.SelectedValue.ToString())
{
// if the user selected either CHAMORRO or TAGALOG as their preference,
//load the resource file for that language
case "gu-CH" :
case "pi-TA" :
ci = new CustomGuamCulture("es-ES",
Radiobuttonlist1.SelectedItem.Value.ToString(),
Radiobuttonlist1.SelectedItem.Text);
break;
default :
ci = new CultureInfo(Radiobuttonlist1.SelectedValue.ToString());
break;
}

Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;

ResourceManager rm = ResourceManager.CreateFileBasedResourceManager("resource",
Server.MapPath("resources") + Path.DirectorySeparatorChar, null);

lblGreeting.Text = rm.GetString("Greeting");
lblNames.Text = rm.GetString("FirstName") + " " + rm.GetString("LastName");
lblDate.Text = DateTime.Now.ToString("D");
lblCulture.Text = "Using culture: " + ci.EnglishName;
}


for more information checkout this link

http://aspnet.4guysfromrolla.com/articles/030304-1.aspx

http://www.microsoft.com/middleeast/msdn/arabicsupp.aspx


Post Reply
You must Sign In to post a response.
Next : about nuicode chrachters
Previous : Creation of Setup for windows application in C#
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use