views:

37

answers:

1

I have some web pages. User can enter anything he wants into the forms which are in my web pages.

I want the special characters(which are visible and non visible on keyboard) to save in Database and retrieve them as it is.

Any suggestions ?

+1  A: 

First of all, define what counts as a special character - since that description doesn't mean anything beyond "I think this might be handled differently."

Secondly, you shouldn't have to do anything extra in order to store these "special" characters (I'm guessing they're non-ASCII NLS characters) in the database - so long as the database supports these characters (you'll likely need to define your column as nvarchar). If the database doesn't support them at all, you'll have to store binary streams as BLOBs and just do all the decoding within your application.

So, as your question stands at the moment, my answer is simply:

  1. Save the Unicode strings to a unicode column in the database
  2. Load this column from the DB at a later point to retrieve them as-is.

If you've tried this, and are coming across any particular problems, then post them. But if you're merely investigating before implementing, I can't see why you'd run into issues.

Andrzej Doyle