Android 微调器未显示UTF-8字符
我的纺纱机需要帮助 微调器配置了以下代码Android 微调器未显示UTF-8字符,android,utf-8,spinner,Android,Utf 8,Spinner,我的纺纱机需要帮助 微调器配置了以下代码 List<String> lCountries = (Arrays.asList(Countries().split(";"))); CharSequence[] csCountries = lCountries.toArray(new CharSequence[lCountries.size()]); final Spinner sCountry = (Spinner) findViewById(R.id.country)
List<String> lCountries = (Arrays.asList(Countries().split(";")));
CharSequence[] csCountries = lCountries.toArray(new CharSequence[lCountries.size()]);
final Spinner sCountry = (Spinner) findViewById(R.id.country);
ArrayAdapter<CharSequence> aCountry = new ArrayAdapter<CharSequence>(this, android.R.layout.simple_spinner_item, csCountries);
aCountry.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
sCountry.setAdapter(aCountry);
我已将UTF8更改为所有可能的更改utf-8、UTF8、utf-8、UTF8,但什么都没有
我知道服务器上的列表是否正常,因为它可以在任何浏览器上运行,并返回带有UTF-8字符的列表
我错过了什么?我必须在其他地方键入UTF-8吗
任何帮助都将不胜感激
谢谢,;
Ramón您的url声明了一种内容类型:
Content-Type: text/html; charset=iso-8859-1
所以你的读者应该
new InputStreamReader(isCountry, "ISO-8859-1")
甚至更好的是,通过使用HttpClient而不是URLConnection,您可以获得内容类型:您的url声明了一种内容类型:
Content-Type: text/html; charset=iso-8859-1
所以你的读者应该
new InputStreamReader(isCountry, "ISO-8859-1")
甚至更好的是,通过使用HttpClient而不是URLConnection,您可以获得以下内容类型: