Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Characetr Encoding to UTF-8

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have an Oracle database which is unfortunately not UTF-8 encoded. When I tried to insert some special characters (for example: the German umlauts) it was not able to recognize and so it replaced those characters with a question mark which is obvious. Now I would like to convert that to UTF-8 encoding. I guess there is a pre defined process of doing that with Oracle. Just wanted to know if there is any other alternative way without changing the Oracle migration approach.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any ideas?
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here Oracle documentation 9i explains character set migration. I am not a dba but changing character set of an existing database seems to be a serious job. I would prefer the export import method if I have to do that on my own. Since character set is strictly related how data is stored, it may result with data corruption and data loss.

Regards,
Fatih.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know the docs from Oracle and the different migration approach they propose. But I would like to know of other alternatives which could be done at the application level.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the Oracle migration approach would become too tedious. Need to think of alternatives.
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,

As I was looking for something else then I came across this one at AskTom site. As Tom says it is not possible which makes sense.
What is your current NLS_CHARACTERSET? User claims some java guys have done this. Interesting issue? I want to give a try if I find a non-UTF8 database.

Regards,
Fatih.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle has this WE8ISO8859P1 and the NLS-CHARSET is set to the German locale which means that support is there for the German umlauts. But what about other European characters? So it is for this reason, I wanted to have a simple solution instead of taking the complicated way of migrating the Oracle database to UTF-8
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering if storing the unicode characters as it is in the database would bring any drawbacks or sideeffects?



Would storing this as it is in the database have any side effects? For example. ğozil would be stored as \u00E7ozil in the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic