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:
 
   filter
 filter-nameSetCharacterEncoding/filter-name
 
 filter-classorg.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter/filter-class
 init-param
   param-nameencoding/param-name
   param-valueUTF-8/param-value
 /init-param
   /filter
 
 I substituted:
 
 filter
 filter-nameSetCharacterEncoding/filter-name
 
 filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class
 init-param
 param-nameencoding/param-name
 param-valueUTF-8/param-value
 /init-param
 init-param
 param-nameforceEncoding/param-name
 param-valuetrue/param-value
 /init-param
   /filter
 
 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=48808831iu=/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 Javier Távara
Hello,
Can you tell me wich file I need to change?

Javier Távara


2013/7/25 Mark H. Wood mw...@iupui.edu

 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:
 
filter
  filter-nameSetCharacterEncoding/filter-name
 
 filter-classorg.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter/filter-class
  init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
  /init-param
/filter
 
  I substituted:
 
  filter
  filter-nameSetCharacterEncoding/filter-name
 
 filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class
  init-param
  param-nameencoding/param-name
  param-valueUTF-8/param-value
  /init-param
  init-param
  param-nameforceEncoding/param-name
  param-valuetrue/param-value
  /init-param
/filter
 
  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=48808831iu=/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=48808831iu=/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:

  filter
filter-nameSetCharacterEncoding/filter-name

filter-classorg.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter/filter-class
init-param
  param-nameencoding/param-name
  param-valueUTF-8/param-value
/init-param
  /filter

I substituted:

filter
filter-nameSetCharacterEncoding/filter-name

filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
init-param
param-nameforceEncoding/param-name
param-valuetrue/param-value
/init-param
  /filter

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=48808831iu=/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

2013-06-28 Thread Halliday, James Leonard
No, unfortunately. In fact, I've still got another instance of DSpace running 
under the same tomcat, that's running DSpace 1.8, and the files look just fine 
there.

From: George Stanley Kozak [mailto:g...@cornell.edu]
Sent: Thursday, June 27, 2013 3:53 PM
To: Halliday, James Leonard; dspace-tech@lists.sourceforge.net
Subject: RE: text encoding problem with bitstreams in DSpace 3.1

Jim:

I had a similar problem recently, but not with DSpace.  It happened when I 
moved some of my websites from a Sun Solaris Server to a LINUX Virtual Machine. 
 Did you, by any chance, migrate to a new server when you upgraded?  I found 
that I had to place AddDefaultCharset Off directive in my Apache Conf file to 
fix the problem.

George Kozak
Digital Library Specialist
Cornell University Library Information Technologies (CUL-IT)
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
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

2013-06-27 Thread Halliday, James Leonard
Hello all,

My problem relates to text encoding. We recently upgraded from DSpace 1.8 to 
3.1, and this upgrade broke many of our existing HTML bitstreams, that are 
UTF-8 encoded. Here is a sample:

https://scholarworks.iu.edu/dspace/bitstream/handle/2022/14101/12.01.13.html?sequence=1

This article looked correct in the old version, and the new version garbles the 
output by forcing ISO-8859. Note that only the bitstreams look incorrect: the 
metadata pages look just fine, so UTF-8 encoding is working everywhere except 
within the bitstreams.

I've been looking  at this for several days now without a solution; does anyone 
have any tips?

Thanks!

-  Jim Halliday

-  Programmer/Analyst Indiana University


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
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

2013-06-27 Thread George Stanley Kozak
Jim:

I had a similar problem recently, but not with DSpace.  It happened when I 
moved some of my websites from a Sun Solaris Server to a LINUX Virtual Machine. 
 Did you, by any chance, migrate to a new server when you upgraded?  I found 
that I had to place AddDefaultCharset Off directive in my Apache Conf file to 
fix the problem.

George Kozak
Digital Library Specialist
Cornell University Library Information Technologies (CUL-IT)
218 Olin Library
Cornell University
Ithaca, NY 14853
607-255-8924

From: Halliday, James Leonard [mailto:jhall...@indiana.edu]
Sent: Thursday, June 27, 2013 2:55 PM
To: dspace-tech@lists.sourceforge.net
Subject: [Dspace-tech] text encoding problem with bitstreams in DSpace 3.1

Hello all,

My problem relates to text encoding. We recently upgraded from DSpace 1.8 to 
3.1, and this upgrade broke many of our existing HTML bitstreams, that are 
UTF-8 encoded. Here is a sample:

https://scholarworks.iu.edu/dspace/bitstream/handle/2022/14101/12.01.13.html?sequence=1

This article looked correct in the old version, and the new version garbles the 
output by forcing ISO-8859. Note that only the bitstreams look incorrect: the 
metadata pages look just fine, so UTF-8 encoding is working everywhere except 
within the bitstreams.

I've been looking  at this for several days now without a solution; does anyone 
have any tips?

Thanks!

-  Jim Halliday

-  Programmer/Analyst Indiana University


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
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