473,322 Members | 1,417 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,322 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 8429
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.