|
The ASCII encoding is 7-bit ASCII only, and doesn't contain any special characters. You should use the same encoding that was used to encode the characters into bytes.
If the data is "8-bit ASCII", try Encoding.Default.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
hi there,
as i am using System.Text.Encoding.Ascii nearly everyday for processing german text (i.e. lots of ö's,ä's,ü's,ß's,...) i definitely know that it supports german special characters.
i guess that the data you are giving as parameter to System.Text.Encoding.ASCII.GetString() isn't encoded correctly.
can you check the correct encoding on the sender side?
|
|
|
|
|
Thanks buddy , I got the solution.
S.Akmal
|
|
|
|
|
Joachim Kerschbaumer wrote: as i am using System.Text.Encoding.Ascii nearly everyday for processing german text (i.e. lots of ö's,ä's,ü's,ß's,...) i definitely know that it supports german special characters.
This only works in the latest version of the framework. In earlier versions any characters outside the standard ASCII character set (0-127) were replaced with question marks.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi..
As per the material i have done it, but its showing message like it has been send but iam not received any sms... can u pls help me
i gone through this link
<a href="http://www.codeproject.com/KB/aspnet/EasySMTP_package.aspx?msg=2425601#xx2425601xx">http://www.codeproject.com/KB/aspnet/EasySMTP_package.aspx?msg=2425601#xx2425601xx</a>[<a href="http://www.codeproject.com/KB/aspnet/EasySMTP_package.aspx?msg=2425601#xx2425601xx" target="_blank" title="New Window">^</a>]
krishna
krishna
|
|
|
|
|
You should ask the article author. Odds seem good to me that you're not hooked up with a working service to send SMS messages.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ok fine, check this code and tell me pls.
mTo = Convert.ToString(txtToNumber.Text.Trim()) + Convert.ToString(cboCarrier.SelectedItem.ToString().Trim());
mFrom = Convert.ToString(txtFrom.Text.Trim());
mSubject = Convert.ToString(txtSubject.Text.Trim());
mMsg = Convert.ToString(txtMessage.Text.Trim());
try
{
MailMessage message = new MailMessage(mFrom, mTo, mSubject, mMsg);
SmtpClient mySmtpClient = new SmtpClient("mail.econsultants.in");
mySmtpClient.UseDefaultCredentials = true;
mySmtpClient.Send(message);
MessageBox("The mail message has been sent to " + message.To.ToString());
}
In drop down i added these....
cboCarrier.Items.Add("@itelemigcelular.com.br")
cboCarrier.Items.Add("@message.alltel.com")
cboCarrier.Items.Add("@message.pioneerenidcellular.com")
cboCarrier.Items.Add("@messaging.cellone-sf.com")
cboCarrier.Items.Add("@messaging.centurytel.net")
cboCarrier.Items.Add("@messaging.sprintpcs.com")
cboCarrier.Items.Add("@mobile.att.net")
cboCarrier.Items.Add("@mobile.cell1se.com")
cboCarrier.Items.Add("@mobile.celloneusa.com")
cboCarrier.Items.Add("@mobile.dobson.net")
cboCarrier.Items.Add("@mobile.mycingular.com")
cboCarrier.Items.Add("@mobile.mycingular.net")
cboCarrier.Items.Add("@mobile.surewest.com")
cboCarrier.Items.Add("@msg.acsalaska.com")
cboCarrier.Items.Add("@msg.clearnet.com")
cboCarrier.Items.Add("@msg.mactel.com")
cboCarrier.Items.Add("@msg.myvzw.com")
cboCarrier.Items.Add("@msg.telus.com")
cboCarrier.Items.Add("@mycellular.com")
cboCarrier.Items.Add("@mycingular.com")
cboCarrier.Items.Add("@mycingular.net")
cboCarrier.Items.Add("@mycingular.textmsg.com")
cboCarrier.Items.Add("@o2.net.br")
cboCarrier.Items.Add("@ondefor.com")
cboCarrier.Items.Add("@pcs.rogers.com")
cboCarrier.Items.Add("@personal-net.com.ar")
cboCarrier.Items.Add("@personal.net.py")
cboCarrier.Items.Add("@portafree.com")
cboCarrier.Items.Add("@qwest.com")
cboCarrier.Items.Add("@qwestmp.com")
cboCarrier.Items.Add("@sbcemail.com")
cboCarrier.Items.Add("@sms.bluecell.com")
cboCarrier.Items.Add("@sms.cwjamaica.com")
cboCarrier.Items.Add("@sms.edgewireless.com")
cboCarrier.Items.Add("@sms.hickorytech.com")
cboCarrier.Items.Add("@sms.net.nz")
cboCarrier.Items.Add("@sms.pscel.com")
cboCarrier.Items.Add("@smsc.vzpacifica.net")
cboCarrier.Items.Add("@speedmemo.com")
cboCarrier.Items.Add("@suncom1.com")
cboCarrier.Items.Add("@sungram.com")
cboCarrier.Items.Add("@telesurf.com.py")
cboCarrier.Items.Add("@teletexto.rcp.net.pe")
cboCarrier.Items.Add("@text.houstoncellular.net")
cboCarrier.Items.Add("@text.telus.com")
cboCarrier.Items.Add("@timnet.com")
cboCarrier.Items.Add("@timnet.com.br")
cboCarrier.Items.Add("@tms.suncom.com")
cboCarrier.Items.Add("@tmomail.net")
cboCarrier.Items.Add("@tsttmobile.co.tt")
cboCarrier.Items.Add("@txt.bellmobility.ca")
cboCarrier.Items.Add("@typetalk.ruralcellular.com")
cboCarrier.Items.Add("@unistar.unifon.com.ar")
cboCarrier.Items.Add("@uscc.textmsg.com")
cboCarrier.Items.Add("@voicestream.net")
cboCarrier.Items.Add("@vtext.com")
cboCarrier.Items.Add("@wireless.bellsouth.com")
krishna
|
|
|
|
|
Is it possible to change the extension of the produced assembly dll to something else. Any solution other than PostBuildEvent ? Looking for solution like CustomAttribute setting or anything like that.
Imtiaz
modified on Tuesday, February 12, 2008 10:03 PM
|
|
|
|
|
Navigate to the assembly in File Explorer, right click the file and select rename.
only two letters away from being an asset
|
|
|
|
|
I am using DataGrid without any database bound. I have costum Columns. I wanted when i put in a numeric value, my cell to display in currency. Tried to put C2 in format and didnt work.
And is it possible using event handler for a cell?
|
|
|
|
|
In my program I am opening another program (a console application) with System.Diagnostics.Process.Start.
How do I hide the console window?
Or if I can't do that in that program (A c# console application) how do I hide the console window?
|
|
|
|
|
Someone asked that last week, try searching for it.
|
|
|
|
|
Hi Guy
very easy man
Process process = new Process();
ProcessStartInfo pStartInfo = new ProcessStartInfo("Your file Name");
pStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo = pStartInfo;
process.Start();
Thanks
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
Thanks so much. Works like a charm
-Brandy
|
|
|
|
|
You are welcome
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
On my form1.cs am displaying around 200 images inside a listbox. Each listbox item contains an image but when i am looking on task manager window in winxp my application is using the most memory. I am controlling the onDrawItem like this
protected override void OnDrawItem(DrawItemEventArgs e)
{
Graphics g = e.Graphics;
Bitmap b1 = new Bitmap(400, 300);
((myImageItems )Items[e.Index]).DrawToBitmap(b1, new Rectangle(0, 0, 400, 300));
Bitmap b = new Bitmap(b1,new Size(100,60));
e.Graphics.DrawImage(b1, e.Bounds.X , e.Bounds.Y , b.Width, b.Height);
g.dispose();
b1.dispose();
b.dispose();
}
I do'nt know where to look into this i tried debuggin but no help so far. Any help i appreciate it.
Thanks
|
|
|
|
|
netJP12L wrote: Graphics g = e.Graphics;
This is SO redundant.
netJP12L wrote: Bitmap b1 = new Bitmap(400, 300);
Why not use meaningful variable names ? And the using keyword ?
netJP12L wrote: g.dispose();
You don't dispose of an object that was passed to you on the event args. Creating a local reference to it makes it more likely you would forget that. Use 'using' blocks, instead of calling dispose.
How much memory is it using ? Remember, the memory usage you see represents more than the memory in use right now, perhaps creating these bitmaps and disposing of them over and over is the reason the number is so high ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for replying Graus, I have edited my codes as you mentioned but still when i start my app the memory is 278,000 and as i click on the downScrollbar its goes up around 350,000+. Can you please help me from your Magic coding. Apart from drawing my own do u think there could be else where problem because all those listbox item i am keeping them in a List of myImageItems
Bitmap imgItm = new Bitmap(400, 300);
Rectangle rect = new Rectangle(0, 0, 400, 300);
protected override void OnDrawItem(DrawItemEventArgs e)
{
using ( Font f = new Font(e.Font.FontFamily, e.Font.Size, FontStyle.Bold))
{
((myImageItems)Items[e.Index]).DrawToBitmap(imgItm , rect);
e.Graphics.DrawImage(imgItm , e.Bounds.X, e.Bounds.Y , 120, 80);
}
}
|
|
|
|
|
350k ? I doubt there's much you can do about it. If it keeps climbing, you've got issues. If what you're describing is the extent of it, then you're probably fine.
Where does the code you've posted use the font you're creating ? Am I missing something ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks once again actually the memory flucate it goes like, starts with 377,000k then when i click quickly couple of times on the downScrollbar it jumps to 415,000k then 500,000k and goes back like 314,000k. The maximum it goes up to 550,000k, haven't seen crossing that. Another thing i noticed that when i click on the downscrollbar button listbox flick and i can see that it's drawing. I put this in the constructor but no result
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true);
In your last post you were saying "perhaps creating these bitmaps and disposing of them over and over is the reason the number is so high ? " if i do'nt create them how else i can do what i am want to do. Can you please show me in ur examples.
I mistakenly deleted the Font code the are as follows.
e.Graphics.DrawString("Picture" + (e.Index + 1), f, Brushes.Black, e.Bounds, StringFormat.GenericDefault);
One of the most important thing i have seen is that i added 200 images in Ms power point too. but when i look at it its memory like 228,000k. and all those clips load way to faster than my application. What may i do to achieve the same result.
Thanks for readign this much.
|
|
|
|
|
netJP12L wrote: if i do'nt create them how else i can do what i am want to do.
By creating them once and keeping them in memory to draw as needed. This would also speed things up, which could help your flicker issues.
netJP12L wrote: One of the most important thing i have seen is that i added 200 images in Ms power point too. but when i look at it its memory like 228,000k. and all those clips load way to faster than my application. What may i do to achieve the same result.
First of all, you're wasting your time watching memory usage this closely ( it just isn't that accurate, and the fact that it goes back down shows there is no leak ). The best way to use less memory is to use C++, like powerpoint does. But, I am sure it would cache the images and not create them every time, as you are doing, that should be enough to solve the issue.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am trying to bold certain paragraphs in a rich text box and have the other text regular then print the document. Can anyone assist me?
Thanks
|
|
|
|
|
Use RichTextBox.SelectionFont, RichTextBox.SelectionStart, RichTextBox.SelectionLength and RichTextBox.SelectedText properties.
|
|
|
|
|
I want to add an object in my listview i can add string but not any controls
Object obj = new Object();
listviewItem itm = new listviewItem(obj);
listview1.Items.Add(itm);
Thanks
|
|
|
|
|
What are you trying to do?
only two letters away from being an asset
|
|
|
|