dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: The surrogate pair is invalid.

  1. #1
    Join Date
    Dec 2007
    Posts
    7

    Smile The surrogate pair is invalid.

    I got the error ("The surrogate pair is invalid.") from a web service which retrieves data from oracle database. the error occured while generating the xml document.

    The data is loaded into the database from flat files which are received from various users from different locations (Korea,japan etc.) How do i set the culture in the webservice to prevent this issue?

    could be of some help if a sample is provided.

    Thanks in advance...

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Do you have session enabled?

    I have seen problem where if session is not enabled you can get odd error messages.

  3. #3
    Join Date
    Dec 2007
    Posts
    7

    The surrogate pair is invalid.

    Yes I have session enabled. I tried disabling the session but i still get the same error.

    Was successfull in querying the data but was unable to generate the xml from the web service.

    Below is the exact error message that i get from the web service.

    "There was an error generating the XML document. ---> The surrogate pair (0xD86E, 0x79) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).".
    Last edited by dev12345; 12-26-2007 at 09:10 AM.

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Does this happen everytime you try to run the code, or just from the files from those two countries?

  5. #5
    Join Date
    Dec 2007
    Posts
    7
    Yes, It just happens with users from those 2 countries they submit data in Korean and Japanese languages, all the other customers are from US and UK.

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    In that case, my guess would be that it is having problems with the "special" characters present in those languages.

    I'll see what I can find on this.

  7. #7
    Join Date
    Mar 2008
    Posts
    1

    Use Encoding technique

    i was getting the same error now you just need to try the different encoding techniques and go for the approbpriate one.
    for japanese and korian you will need to encode ur file to Encoding.UTF7 or to Unicode its the only solution to ur problem.
    Asif

Similar Threads

  1. Retaining invalid data in bound controls
    By sthomaso@phmini in forum .NET
    Replies: 0
    Last Post: 04-09-2007, 01:52 PM
  2. invalid input syntax for type boolean
    By evian in forum Database
    Replies: 1
    Last Post: 09-01-2006, 04:54 AM
  3. Replies: 2
    Last Post: 07-06-2006, 07:28 PM
  4. Replies: 0
    Last Post: 07-06-2006, 10:27 AM
  5. DirectX - Invalid Pointer
    By Jonas in forum .NET
    Replies: 4
    Last Post: 12-07-2001, 08:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center