Although we spoke in IRC, I post it here just so other people can know (and it's stored):
I've been "debugging" and the string is recovered properly from clob fields (metadata of Items), not from varchar2 fields (names of collections/communities). I've been tracking the error up to DatabaseManager.java, process method. There when you recover a VARCHAR type, you test result.getBytes(i). If it is null, you encode the String with results.getString(i), if not, with new String(results.getBytes(i), "UTF-8"); If the field has any value it will be always encoded using getBytes(), as it is, and that's the reason I see the "?" chars. If I change the code so it always uses getString(), it works like a charm. There's no problem with CLOB fields as they are always read with "getString()". The issue happens with Oracle 10.0.2.0. Thanks for your help at IRC Graham :) Pere On Thu, 2008-05-01 at 10:47 +0100, Graham Triggs wrote: > Can you confirm what is being written into the database? > > For the item metadata, all the values are written into CLOB columns. > > The Collection/Community name is a VARCHAR2. > > I suspect there is an issue in the way that the values are being written > to / read from those two different types of columns. > > G > > Pere Villega wrote: > > Hi, > > > > maybe someone can help me. I'm using JSPUI in Dspace 1.5 and I'm having > > a really odd issue with encoding. When I submit any document with Irish > > characters (á,é, etc.) in any of its fields, it works fine, and it shows > > them on the item view. > > > > But if i use the same characters to name a community/collection, it > > doesn't work. It shows me the "?" char (under firefox) that means it > > can't decode it. > > > > The "oddest" thing is that if I submit an item to a collection, using > > those special characters to name both, in the item view page I see the > > special chars of the item (á, etc) but I see "?" instead of the special > > ones of the collection. > > > > Database is Oracle using UTF-8, and as items characters are working it > > should not be that problem. Tomcat uses UTF-8 encoding (set in > > connector). > > > > Any idea? It's driving me crazy. > > > > My system: > > - Debian server > > - Oracle 10.0.2.0 > > - Database with al32utf8 (utf-8) encoding > > - Tomcat 6.0.13 > > - JDK 6 > > > > > > Best regards, > > Pere Villega > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > _______________________________________________ > > DSpace-tech mailing list > > DSpace-tech@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/dspace-tech > > > > > This e-mail is confidential and should not be used by anyone who is not > the original intended recipient. BioMed Central Limited does not accept > liability for any statements made which are clearly the sender's own and > not expressly made on behalf of BioMed Central Limited. No contracts may > be concluded on behalf of BioMed Central Limited by means of e-mail > communication. BioMed Central Limited Registered in England and Wales with > registered number 3680030 Registered Office Middlesex House, 34-42 > Cleveland Street, London W1T 4LB > This email has been scanned by Postini. > For more information please visit http://www.postini.com > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech