aspose file tools*
The moose likes Oracle/OAS and the fly likes Question on Characetr Encoding to UTF-8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Question on Characetr Encoding to UTF-8" Watch "Question on Characetr Encoding to UTF-8" New topic
Author

Question on Characetr Encoding to UTF-8

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9426
    
    2

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.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9426
    
    2

Any ideas?
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
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

Joined: Sep 26, 2006
Posts: 9426
    
    2

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

Joined: Sep 26, 2006
Posts: 9426
    
    2

Looks like the Oracle migration approach would become too tedious. Need to think of alternatives.
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
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

Joined: Sep 26, 2006
Posts: 9426
    
    2

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

Joined: Sep 26, 2006
Posts: 9426
    
    2

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Characetr Encoding to UTF-8