Can you open a JIRA issue for this? Thanks
Sent from my Verizon Wireless BlackBerry -----Original Message----- From: Bill Li <bill.z...@gmail.com> Date: Thu, 08 Apr 2010 15:36:38 To: <cas-user@lists.jasig.org> Subject: [cas-user] Encoding when parsing validation response should be configurable in CAS client (3.1.10) I need pass attributes in Chinese from CAS to my own CAS protected app. By following http://www.ja-sig.org/wiki/display/CASUM/Internationalizationto set encoding as utf-8. However here is the problem. * org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer * will call *org.jasig.cas.client.util.getResponseFromServer* to get response string. Current implementation will take default charset to construct InputStreamReader. See following: *final BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));* This will cause problem when the CAS protected app runs in a system with non UTF-8 charset, like my case. If we change it to: * final BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));* This will fix the problem. My tests proved this. Is my understanding correct? If yes, can this be fixed in next client release? I also suggest enforce a consistent encoding for CAS like many other protocol does. -- Bill Li(李保存) http://BaliOnWeb.com -- You are currently subscribed to cas-user@lists.jasig.org as: scott.battag...@gmail.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to cas-user@lists.jasig.org as: arch...@mail-archive.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user