如何获取ISO-8859-15中的InputStreamReader?
如何使该输入流读取 ISO-8859-15 编码文件?
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet)));
我发现这行看似有效:
BufferedReader br = new BufferedReader(new InputStreamReader(ftp.getInputStream(), "ISO-8859-15"));
但
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet), "ISO-8859-15"));
无效。
How can I make this inputstream read a ISO-8859-15 encoded file?
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet)));
I found this line which seemingly works:
BufferedReader br = new BufferedReader(new InputStreamReader(ftp.getInputStream(), "ISO-8859-15"));
But
BufferedReader r = new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.jet), "ISO-8859-15"));
does not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来:
有效。显然,在这种情况下,您需要发送一个字符集,而不是带有编码的字符串。鉴于此,这似乎很奇怪:
It seems that:
works. Apparently you need to send a Charset, not a String with the encoding in this case. Given this it seems strange that this works then: