EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #08523
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- To: David R Newman <drn@ecs.soton.ac.uk>, "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, James Kerwin <jkerwin2101@gmail.com>
- Subject: Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Wed, 17 Feb 2021 15:05:17 +0000
CAUTION: This e-mail originated outside the University of Southampton.
Hi James,
I think I've seen similar issues for the file URLs. At some point, the Symplectic connector code did something silly like send data (from Elements) as UTF16, and then try to decode it as UTF8.
In ~/lib/plugins/Symplectic/Handlers/RepositoryHandler.pm, around line 163, do you have this:
for (my $i = 0; $i < $limit; $i += 6) {
my $unicode = substr($filename, $i, 6);
if (!$unicode =~ m/^0x/)
{
Symplectic::Log->trace('session' => $session, 'message' => "Failed to parse unicode block $unicode");
$fail = 1;
last;
}
$fn .= chr(hex(substr($unicode, 2, 2)));
$fn .= chr(hex(substr($unicode, 4, 2)));
}
if (!$fail)
{
# explicitly decode UTF-16 big endian string
$filename = decode("UTF-16BE", $fn);
}
If not, I might have some updated connector code that might be of use...
Or it might be something else instead.
Cheers,
John
From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of James Kerwin via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Sent: 17 February 2021 12:52 To: David R Newman <drn@ecs.soton.ac.uk> Cc: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk> Subject: Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
CAUTION: This e-mail originated outside the University of Southampton.
Right it did not take long to refamiliarise myself. The following EPrints record has one file with a semicolon in the file name (";" for the avoidance of doubt). I can access the file on EPrints, but in Elements via Chrome and FireFox I get quite
similar errors.
EPrints Record: https://livrepository.liverpool.ac.uk/3008387/
In Elements when I go to the record and click the file icon I would expect it to download or open in the browser, instead I get an error:
Going through this with another file on another record that has no ";" in the filename it works as expected. Looking at the links from both EPrints and Elements there's some sort of difference in the link to the file:
https://livrepository.liverpool.ac.uk/3008387/1/Induction%20with%20Thymoglobulin%20in%20High-Risk%20Renal%20Transplant%20Patients%3B%20Beauty%20and%20the%20Beast.pdf
https%3A%2F%2Flivrepository.liverpool.ac.uk%2Frt4eprints%2Ffile%2F106106%2FInduction%2520with%2520Thymoglobulin%2520in%2520High-Risk%2520Renal%2520Transplant%2520Patients%253B%2520Beauty%2520and%2520the%2520Beast.pdf
This is an example of what we get for a working record:
EPrints File Link:
Elements File Link:
The only consistent difference is the presence of these characters, but I can't really understand where it's going wrong. I had wanted to take a proper look at it and get in touch with Symplectic, but people have the audacity to keep finding new problems
and giving me more work... We are due to upgrade to RT2 soonish (2nd half of this year probably) and I am hoping all of this goes away with that.
Thanks,
James
On Wed, Feb 17, 2021 at 12:18 PM James Kerwin <jkerwin2101@gmail.com> wrote:
|
- Follow-Ups:
- Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- References:
- [EP-tech] Elements-EPrints Odd Characters stopping upload
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- From: James Kerwin <jkerwin2101@gmail.com>
- Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Elements-EPrints Odd Characters stopping upload
- Prev by Date: Re: [EP-tech] Elements-EPrints Odd Characters stopping upload
- Next by Date: Re: [EP-tech] search filter to show only the last version
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):