2
我有以下代碼:如何在Android中設置charset = UTF-8?
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.setAccept(Collections.singletonList(new MediaType("text","plain;charset=UTF-8")));
然而,這把我一個IllegalArgumentException。問題是我想將charset設置爲UTF-8,而無需從配置文件更改它。這可能嗎?