473,394 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

invalid character error

I had a project which was working until this morning and I
keep getting the following error. Does anyone know what
has happened and how I can fix it??

error message - There is an invalid character in the given
encoding. Line 1, position 1.

line highlighted in red = this.LoadLayout(this.GetType
(), "Causeway_Reports.ForensicEvidenceDetails.rpx" );
Nov 16 '05 #1
2 8436
Hi Anna,

I haven't had this error before, but the error points to line 1, position 1.
From the error message I suspect that the character in the first position is some extended or unicode character.

If you don't see anything out of the ordinary on line 1, try deleting the entire line and then rewrite it (not copy and paste).

The line highlighted in red is probably related to some other error.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2
By the fact that this is an RPX file, I assume we are talking about crystal
reports. and that this is an XML based report layout file.

Did you open your XML file in Visual Studio? If so, did you change the
encoding (from UTF8 to UTF16)? This rarely works well. I've had
situations where Visual Studio would refuse to open the file again, unless
you specify a different editor to open it with.

First, check to see if you can open your file with Notepad. Notepad is
actually pretty sophisticated at dealing with encoding. If you can, take a
look in the first line of the XML to see if the encoding is listed as UTF16.
If so, you will need to set it back. Here's how:

Open Visual Studio. Make sure that your RPX file is in your project.
In the solution explorer, right-click the file and say Open With
In the list of editors, chose "XML editor with encoding"
when the dialog appears asking for "which encoding", leave "auto-detect" and
click Open.

you should get the file to open.

Then, select the file again in the solution explorer. Look at the
properties. You should see the encoding. Click the encoding property to
expose the drop-down. Select UTF8.

Save your file.

Good Luck,
---- Nick

"Anna Carr" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
I had a project which was working until this morning and I
keep getting the following error. Does anyone know what
has happened and how I can fix it??

error message - There is an invalid character in the given
encoding. Line 1, position 1.

line highlighted in red = this.LoadLayout(this.GetType
(), "Causeway_Reports.ForensicEvidenceDetails.rpx" );

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Barry Young | last post by:
I am using the following code to insert a row in an Oracle Database. strConnection = "Provider=OraOLEDB.Oracle;Data Source=MYDATABASE;User Id=SYSTEM;Password=******" Dim strMessage As String ...
4
by: Supertzar | last post by:
Hi, I'm trying to use MapPath on a folder named with a comma in it: xmldoc.load Server.MapPath(Request.QueryString("fname")) where the querysting is something like "fname=this, that/this,...
0
by: Anna Carr | last post by:
I had a project which was working until this morning and I keep getting the following error. Does anyone know what has happened and how I can fix it?? error message - There is an invalid...
6
by: jasn | last post by:
Hello I am getting the following error message when I try and send an XML sting to a web service, I read somewhere that most web services prefer ascii and some throw errors when using unicode so...
0
by: DCC700 | last post by:
After converting a web application to 2005, I am receiving an invalid character error when I change the value in a dropdown list. The dropdown list is set to postback on selected index changed and...
3
by: Middletree | last post by:
Teaching myself ASP.NET, using Microsoft Press book called ASP.NET 2.0 by George Shepherd. Ch. 2, it says to type the following code: <%@ Page Language="C#" %> <html>
1
by: DCC700 | last post by:
After upgrading a web application from VS 2003 to 2005 there is a page where any control event that should cause a postback instead generates an Invalid character error on the page. For example a...
4
by: Arpan | last post by:
I am working on Win2K Pro. Due to some problems in IIS5.0, I had to uninstall & re-install IIS. After re-installing IIS, when I try to run any ASPX page (all my ASPX pages reside in...
1
by: qbp90x5lb | last post by:
I'm using an XSLT transform to output the element value contents from a simple XML file into a new .TXT file. Everything works fine except for certain XML files, when calling msxsl with the .xslt, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.