Re: [Dspace-tech] text encoding problem with bitstreams in DSpace 3.1 - resolved

2013-07-25 Thread Javier Távara
Hello,
Can you tell me wich file I need to change?

Javier Távara


2013/7/25 Mark H. Wood 

> On Thu, Jul 25, 2013 at 03:07:36AM +, Halliday, James Leonard wrote:
> > Hi everyone,
> >
> > I posted about this a while back, and finally found a workaround so I
> wanted to share. My problem was regarding HTML bitstreams in DSpace 3.1
> (XMLUI).
> >
> > In previous versions of DSpace, the encoding for my UTF-8 bitstreams
> worked just fine, but in DSpace 3.1, the encoding for ONLY the bitstreams
> was coming out as ISO-8859 instead. After much searching, I finally found a
> workaround which involved changing a value in the web.xml file, as follows:
> >
> > In the original web.xml are the following lines:
> >
> >   
> > SetCharacterEncoding
> >
> org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter
> > 
> >   encoding
> >   UTF-8
> > 
> >   
> >
> > I substituted:
> >
> > 
> > SetCharacterEncoding
> >
> org.springframework.web.filter.CharacterEncodingFilter
> > 
> > encoding
> > UTF-8
> > 
> > 
> > forceEncoding
> > true
> > 
> >   
> >
> > So basically I took out the DSpace-specific encoding filter, and
> substituted the Spring one (which is already included by default). So I had
> to change only these lines, and my encoding problem was resolved. This
> tells me there might be a problem in the DSpace encoding filter ... ?
>
> Thank you.  Interesting.  If this works well, then at the least we
> could just use Spring's filter and stop maintaining our own.
>
> I'm thinking that our filter as written could never have done what you
> expect, and the effect was produced elsewhere.  Our filter only sets
> the request's encoding.  Spring's filter is documented to also set the
> response's encoding when forceEncoding=true.  Perhaps BitstreamReader
> should just set the encoding on the response?
>
> --
> Mark H. Wood, Lead System Programmer   mw...@iupui.edu
> Machines should not be friendly.  Machines should be obedient.
>
>
> --
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] text encoding problem with bitstreams in DSpace 3.1 - resolved

2013-07-25 Thread Mark H. Wood
On Thu, Jul 25, 2013 at 03:07:36AM +, Halliday, James Leonard wrote:
> Hi everyone,
> 
> I posted about this a while back, and finally found a workaround so I wanted 
> to share. My problem was regarding HTML bitstreams in DSpace 3.1 (XMLUI). 
> 
> In previous versions of DSpace, the encoding for my UTF-8 bitstreams worked 
> just fine, but in DSpace 3.1, the encoding for ONLY the bitstreams was coming 
> out as ISO-8859 instead. After much searching, I finally found a workaround 
> which involved changing a value in the web.xml file, as follows:
> 
> In the original web.xml are the following lines:
> 
>   
> SetCharacterEncoding
> 
> org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter
> 
>   encoding
>   UTF-8
> 
>   
> 
> I substituted:
> 
> 
> SetCharacterEncoding
> 
> org.springframework.web.filter.CharacterEncodingFilter
> 
> encoding
> UTF-8
> 
> 
> forceEncoding
> true
> 
>   
> 
> So basically I took out the DSpace-specific encoding filter, and substituted 
> the Spring one (which is already included by default). So I had to change 
> only these lines, and my encoding problem was resolved. This tells me there 
> might be a problem in the DSpace encoding filter ... ?

Thank you.  Interesting.  If this works well, then at the least we
could just use Spring's filter and stop maintaining our own.

I'm thinking that our filter as written could never have done what you
expect, and the effect was produced elsewhere.  Our filter only sets
the request's encoding.  Spring's filter is documented to also set the
response's encoding when forceEncoding=true.  Perhaps BitstreamReader
should just set the encoding on the response?

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Machines should not be friendly.  Machines should be obedient.


signature.asc
Description: Digital signature
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] text encoding problem with bitstreams in DSpace 3.1 - resolved

2013-07-24 Thread Halliday, James Leonard
Hi everyone,

I posted about this a while back, and finally found a workaround so I wanted to 
share. My problem was regarding HTML bitstreams in DSpace 3.1 (XMLUI). 

In previous versions of DSpace, the encoding for my UTF-8 bitstreams worked 
just fine, but in DSpace 3.1, the encoding for ONLY the bitstreams was coming 
out as ISO-8859 instead. After much searching, I finally found a workaround 
which involved changing a value in the web.xml file, as follows:

In the original web.xml are the following lines:

  
SetCharacterEncoding

org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter

  encoding
  UTF-8

  

I substituted:


SetCharacterEncoding

org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true

  

So basically I took out the DSpace-specific encoding filter, and substituted 
the Spring one (which is already included by default). So I had to change only 
these lines, and my encoding problem was resolved. This tells me there might be 
a problem in the DSpace encoding filter ... ?

- Jim Halliday





--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette