EPrints Technical Mailing List Archive
Message: #07714
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] REST problems with capital letters
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] REST problems with capital letters
- From: Christer Enkvist <christer.enkvist@slu.se>
- Date: Wed, 20 Feb 2019 11:12:37 +0000
Dear all, Updating perl_lib/EPrints/Apache/REST.pm by adding binmode( *STDIN, ":utf8" ); binmode( *STDOUT, ":utf8" ); in the beginning of the subroutine put_field_txt seems to solve this specific issue. I assume that the charset really should be obtained in some other more dynamic way but don't know how. /Christer -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> On Behalf Of Christer Enkvist via Eprints-tech Sent: den 19 februari 2019 14:04 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] REST problems with capital letters Hi all, For some reason I cannot use the REST to update fields with text containing non-ascii capital letter, such as Å, Ä, Ö or Ü. No problem with smaller caps like å, ä, ö and ü. Works: curl -v -u $user:$pass -H "Content-Type:text/plain;charset=UTF-8" --data-binary 'åäö-ü works' -X PUT 'https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftestserver.slub.se%2Frest%2Feprint%2F1%2Fcomment.txt&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=uYuEHrVv2VNPgS0qqGN5dRrWyrnTjEwdufLx58AWIVc%3D&reserved=0' Fails: Works: curl -v -u $user:$pass -H "Content-Type:text/plain;charset=UTF-8" --data-binary 'Ö do not work' -X PUT 'https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftestserver.slub.se%2Frest%2Feprint%2F1%2Fcomment.txt&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=uYuEHrVv2VNPgS0qqGN5dRrWyrnTjEwdufLx58AWIVc%3D&reserved=0' probably something very simple I missed but I cannot find what. Any help much appreciated. Actually, it doesn't seem like the header is required, even curl -v -u $user:$pass -d 'åäö-ü works' -X PUT 'https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftestserver.slub.se%2Frest%2Feprint%2F1%2Fcomment.txt&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=uYuEHrVv2VNPgS0qqGN5dRrWyrnTjEwdufLx58AWIVc%3D&reserved=0' works. But as said before, when trying to send capitals with umlauts, rings etc then you get weird stuff like Ã�Ã�Ã� instead. Note: No errors anywhere, simple scambled data inserted. Regards, Christer Enkvist --- När du skickar e-post till SLU så innebär detta att SLU behandlar dina personuppgifter. För att läsa mer om hur detta går till, klicka här <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.slu.se%2Fom-slu%2Fkontakta-slu%2Fpersonuppgifter%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=W%2BydRFuvBn5QQG%2FDvATGqsv%2BzY689WgkEwrgS2tkthI%3D&reserved=0> E-mailing SLU will result in SLU processing your personal data. For more information on how this is done, click here <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.slu.se%2Fen%2Fabout-slu%2Fcontact-slu%2Fpersonal-data%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=4su2dnKTrcrhNIrMDSg6%2FDCCNjr7v6nl502NV7AOPxY%3D&reserved=0> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=BCSDNe4qS6fE9bWbEMzRLwLKoGGis8KFw2pxhxodp9Q%3D&reserved=0 *** EPrints community wiki: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=UhqQWi%2FP6A2NhYtHgREVjOJfwlsqQHWo2cemrGFp3C4%3D&reserved=0 *** EPrints developers Forum: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=kiInFnVpuSuHGhgsI5DCj3LWu0euFNJivSUJ9M6etzo%3D&reserved=0 --- När du skickar e-post till SLU så innebär detta att SLU behandlar dina personuppgifter. För att läsa mer om hur detta går till, klicka här <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.slu.se%2Fom-slu%2Fkontakta-slu%2Fpersonuppgifter%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=W%2BydRFuvBn5QQG%2FDvATGqsv%2BzY689WgkEwrgS2tkthI%3D&reserved=0> E-mailing SLU will result in SLU processing your personal data. For more information on how this is done, click here <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.slu.se%2Fen%2Fabout-slu%2Fcontact-slu%2Fpersonal-data%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cdb2b64f82e234ab589c708d6972454a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=4su2dnKTrcrhNIrMDSg6%2FDCCNjr7v6nl502NV7AOPxY%3D&reserved=0>
- Follow-Ups:
- Re: [EP-tech] REST problems with capital letters
- From: Christer Enkvist <christer.enkvist@slu.se>
- Re: [EP-tech] REST problems with capital letters
- References:
- [EP-tech] REST problems with capital letters
- From: Christer Enkvist <christer.enkvist@slu.se>
- Re: [EP-tech] REST problems with capital letters
- From: Christer Enkvist <christer.enkvist@slu.se>
- [EP-tech] REST problems with capital letters
- Prev by Date: Re: [EP-tech] Open Acces URL
- Next by Date: [EP-tech] EPrints 404 file not found, but file still exist
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):