无法在希伯来语上获得元数据标题(在乱码上获取)
unable to get metadate title on hebrew (get it on gibberish)
我正在开发 android 应用程序
在编写代码以获取流媒体标题时"now loading"我无法收到希伯来语的标题
但我收到他时是胡言乱语
如果有人能帮助我,我将不胜感激
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();
}
}
}
}
看起来像IcyMetaData simply casts raw bytes to char
(effectively doing ISO-8859-1 encoding instead of using detecting whatever the server sends) at line 149:
metaData.append((char) b);
如果没有 patching/fixing IcyMetaData
class,我看不出解决这个问题的方法。
我正在开发 android 应用程序
在编写代码以获取流媒体标题时"now loading"我无法收到希伯来语的标题
但我收到他时是胡言乱语
如果有人能帮助我,我将不胜感激 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();
}
}
}
}
看起来像IcyMetaData simply casts raw bytes to char
(effectively doing ISO-8859-1 encoding instead of using detecting whatever the server sends) at line 149:
metaData.append((char) b);
如果没有 patching/fixing IcyMetaData
class,我看不出解决这个问题的方法。