TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kennedy chozo
NA
7
33k
C# Warning: No data for encoding 1252
Nov 12 2013 11:47 PM
Hello, I'm currently using windows 8 64-bit OS and C# in Visual Studio 2010 64bit. I'm getting some warning when compiling. How can I fix this warning ?
MyCodes:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace SkillFeed_Downloader
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnfiledialog_Click(object sender, EventArgs e)
{
OpenFileDialog fd = new OpenFileDialog();
fd.ShowDialog();
filepath.Text = fd.FileName;
filepath.Enabled = false;
}
private void btndownload_Click(object sender, EventArgs e)
{
WebClient client = new WebClient();
client.Encoding = System.Text.Encoding.UTF8;
string url = txturl.Text;
string path = filepath.Text;
client.DownloadFileAsync(new Uri(url), (path));
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
}
void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
progressBar1.Value = e.ProgressPercentage;
lblbytereceived.Text = e.BytesReceived.ToString();
lbltotalbytes.Text = e.TotalBytesToReceive.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Warnings:
Error 1 Invalid Resx file. Type in the data at line 138, position 5, cannot be loaded because it threw the following exception during construction: No data is available for encoding 1252.
Error 2 TargetInvocationException: Type in the data at line 138, position 5, cannot be loaded because it threw the following exception during construction: No data is available for encoding 1252. at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader) at System.Resources.ResXResourceReader.EnsureResData() at System.Resources.ResXResourceReader.GetEnumerator() at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(ReaderInfo readerInfo, IResourceReader reader, String fileName) at Microsoft.Build.Tasks.ProcessResourceFiles.ReadResources(String filename, Boolean shouldUseSourcePath) at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFileOrDir) XmlException: Type in the data at line 138, position 5, cannot be loaded because it threw the following exception during construction: No data is available for encoding 1252. Line 138, position 5. NotSupportedException: No data is available for encoding 1252. at System.Text.BaseCodePageEncoding.LoadCodePageTables() at System.Text.BaseCodePageEncoding..ctor(Int32 codepage, Int32 dataCodePage) at System.Text.SBCSCodePageEncoding..ctor(SerializationInfo info, StreamingContext context)
Reply
Answers (
2
)
textbox validation
About Ellispe in C#