我正在开发android应用程序
当做一个代码来获取流标题"now code“时,我无法接收希伯来语的标题
但我收到了他的胡言乱语
如果有人能帮我做这件事,我会是一个很棒的enter image description here
@Override
protected IcyStreamMeta doInBackground(URL... urls)
{
try
{
streamMeta.refreshMeta();
Log.e("Retrieving MetaData","Refreshed Metadata");
}
catch (IOException e)
{
Log.e(MetadataTask2.class.toString(), e.getMessage());
}
return streamMeta;
}
@Override
protected void onPostExecute(IcyStreamMeta result)
{
try
{
title_artist=streamMeta.getTitle();
Log.e("Retrieved title_artist", title_artist);
if(title_artist.length()>0)
{
textView.setText(title_artist);
}
}
catch (IOException e)
{
Log.e(MetadataTask2.class.toString(), e.getMessage());
}
}
}
class MyTimerTask extends TimerTask {
public void run() {
try {
streamMeta.refreshMeta();
} catch (IOException e) {
e.printStackTrace();
}
try {
String title_artist=streamMeta.getTitle();
Log.i("ARTIST TITLE", title_artist);
} catch (IOException e) {
e.printStackTrace();
}
}
}}
发布于 2020-04-24 20:36:28
看起来IcyMetaData只是简单地将原始字节转换为line 149上的char (有效地执行ISO-8859-1编码,而不是使用检测服务器发送的内容)
metaData.append((char) b);如果不修补/修复IcyMetaData类,我看不到解决这个问题的方法。
https://stackoverflow.com/questions/61408188
复制相似问题