anda
asked on
ASP.NET 2.0 website fails on open - unable to translate Unicode character
I am running Windows XP SP2. I recently installed Visual Studio 2005 Standard Edition. I created a new website and put a single gridview control on it that is linked to an ms access database. I wrote no code. When I try to open the website I get the following error message:
Unable to translate Unicode character \uDF5D at index 1 to specified code page.
I don't know if it is relevant, but I had previously installed the Visual Studio 2005 Professional 90 day demo, whick I uninstalled before installing the Standard version.
Thank you for any assistance,
Eva
Unable to translate Unicode character \uDF5D at index 1 to specified code page.
I don't know if it is relevant, but I had previously installed the Visual Studio 2005 Professional 90 day demo, whick I uninstalled before installing the Standard version.
Thank you for any assistance,
Eva
- Does your project files names in latin-chars ?
If possible, give us the line where this error occured to discuss further.
Regards,
Nehaya
If possible, give us the line where this error occured to discuss further.
Regards,
Nehaya
ASKER
Nehaya,
Thank you for your response. The access mdb is named Current Data.mdb and the data in it does not contain non-Latin characters. The full text of the error message is:
Server Error in '/WMSWebLookup' Application.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Unable to translate Unicode character \uDF5D at index 1 to specified code page.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Text.EncoderFallbac kException : Unable to translate Unicode character \uDF5D at index 1 to specified code page.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[EncoderFallbackException: Unable to translate Unicode character \uDF5D at index 1 to specified code page.]
System.Text.EncoderExcepti onFallback Buffer.Fal lback(Char charUnknown, Int32 index) +156
System.Text.EncoderFallbac kBuffer.In ternalFall back(Char ch, Char*& chars) +267
System.Text.UTF8Encoding.G etByteCoun t(Char* chars, Int32 count, EncoderNLS baseEncoder) +2828709
System.Text.UTF8Encoding.G etByteCoun t(String chars) +45
System.IO.BinaryWriter.Wri te(String value) +38
System.Web.UI.ObjectStateF ormatter.S erializeVa lue(Serial izerBinary Writer writer, Object value) +406
[ArgumentException: Error serializing value '1.479.2733' of type 'System.String.']
System.Web.UI.ObjectStateF ormatter.S erializeVa lue(Serial izerBinary Writer writer, Object value) +4860
System.Web.UI.ObjectStateF ormatter.S erialize(S tream outputStream, Object stateGraph) +140
System.Web.UI.ObjectStateF ormatter.S erialize(O bject stateGraph) +93
System.Web.UI.ObjectStateF ormatter.S ystem.Web. UI.IStateF ormatter.S erialize(O bject state) +30
System.Web.UI.Util.Seriali zeWithAsse rt(IStateF ormatter formatter, Object stateGraph) +52
System.Web.UI.HiddenFieldP ageStatePe rsister.Sa ve() +125
System.Web.UI.Page.SavePag eStateToPe rsistenceM edium(Obje ct state) +148
System.Web.UI.Page.SaveAll State() +979
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +5016
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Thank you for your response. The access mdb is named Current Data.mdb and the data in it does not contain non-Latin characters. The full text of the error message is:
Server Error in '/WMSWebLookup' Application.
--------------------------
Unable to translate Unicode character \uDF5D at index 1 to specified code page.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Text.EncoderFallbac
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[EncoderFallbackException:
System.Text.EncoderExcepti
System.Text.EncoderFallbac
System.Text.UTF8Encoding.G
System.Text.UTF8Encoding.G
System.IO.BinaryWriter.Wri
System.Web.UI.ObjectStateF
[ArgumentException: Error serializing value '1.479.2733' of type 'System.String.']
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.Util.Seriali
System.Web.UI.HiddenFieldP
System.Web.UI.Page.SavePag
System.Web.UI.Page.SaveAll
System.Web.UI.Page.Process
--------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nehaya,
The problem was in the data - it contained numerous unprintable characters. After editing them out the site opened properly. Many thanks.
Eva
The problem was in the data - it contained numerous unprintable characters. After editing them out the site opened properly. Many thanks.
Eva
-in this page:
http://msdn2.microsoft.com/en-us/library/system.text.encoderexceptionfallback.aspx
I found these lines:
"However, an encoding operation can fail if the input character cannot be represented by the encoding. For example, an ASCIIEncoding object cannot encode a character whose Unicode code point value is outside the range U+0000 to U+007F. "
-Do you use latin-only in your databases?
-Does your mdb filename has any non-latin characters?
Regards,
Nehaya