We had the same issue here, having an Oracle instance in ISO-8859-1 charset. 
While it doesn't seems to be a problem for CLOB columns (our metadatas contains 
a lot of accents and everything is working fine, including insertions and 
updates tests), it does cause one with the VARCHAR2 columns, like collection's 
name, community's name etc. What I've done to try to correct this is a very 
small change in the process() method of class 
src/org/dspace/storage/rdbms/DatabaseManager.java : 
 
in the section of the condition if (jdbctype == Types.VARCHAR) :
 
try
{
    byte[] bytes = results.getBytes(i);
    if (bytes != null && !"oracle".equals(dbName))
    {
        String mystring = new String(results.getBytes(i), "UTF-8");
        row.setColumn(name, mystring);
    }
    else
    {
        row.setColumn(name, results.getString(i));
    }
}
 
After doing that modification, I've done many tests with actions related with 
VARCHAR2 columns like updating the name of a collection and everything seems to 
work correctly. Having said that, of course, our metasdatas contains mostly 
characters that are included in the ISO-8859-1 charset. I'm pretty sure that 
this trick doesn't work with chacacters that doesn't have a ISO-8859-1 
representation, but in our case, it is almost impossible to obtain an UTF-8 
specific instance for DSpace. We must get with it.
 
Hope that helps.

________________________________

De: [EMAIL PROTECTED] de la part de Graham Triggs
Date: jeu. 2007-10-11 06:26
À: Jose Luis Fernandez Perez
Cc: dspace-tech@lists.sourceforge.net
Objet : Re: [Dspace-tech] Problems using legacy oracle database (in latin1)



Jose,

It's vaguely possible to run it using national character set columns
(NCHAR, NCLOB), to allow for a different character encoding (the ncs
columns could be UTF-8, whilst everything else remain Latin-1).

However, we've been down that route, and it involves some very nasty
customisations to the core DSpace classes that are quite hard to
maintain.

We have since switched to using a UTF-8 instance, and I would strongly
recommend anyone to do the same if it at all possible.

I realise you (like us), may have legacy issues that prevent the use of
UTF-8 for a shared database instance, but there are few reasons why you
couldn't have a separate instance specifically for DSpace setup as UTF-8
on the same hardware (at no additional cost).

G

On Thu, 2007-10-11 at 12:12 +0200, Jose Luis Fernandez Perez wrote:
> Hi all
>
> Im having problems trying to use DSpace with a latin1 oracle database. I
> cannot use another charset due to production constrains. I know DSpace
> is prepared to be used in UTF8, but... Is there a workarround to such a
> case? Or, is there an easy way to intercept SQL queries and perform the
> charset conversion? I hope someone could help me.
>
> Thanks in advance
>
> Jose Fernández
> UOC (Universitat Oberta de Catalunya).
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
This email has been scanned by Postini.
For more information please visit http://www.postini.com 
<http://www.postini.com/> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to