• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Storing Hypen in database from java

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a String which contains a hypen. I am using JDBC to connect to Oracle 10g database. When the string content is stored in the database hypen gets converted to inverted question mark.

Any suggestion on how to retain the hypen in database is greatly appreciated.

[ September 23, 2008: Message edited by: Vishnu Prakash ]
[ September 23, 2008: Message edited by: Vishnu Prakash ]
 
Srikanth Basa
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the code you are using ?
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the string content is stored in the database hypen gets converted to inverted question mark.
Where - and how - do you see that it is stored in the database as a question mark?

quote
When data character set conversion is required, the target character set should be a superset of the source datafile character set. Otherwise, characters that have no equivalent in the target character set are converted to replacement characters, often a default character such as a question mark (?). This causes loss of data.

Data Conversion in JDBC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic