2010-01-20, 09:26
Dear:
From:
http://xbmc.svn.sourceforge.net/viewvc/x...iew=markup
2809 int CXbmcHttp::xbmcGetSystemInfoByName(int numParas, CStdString paras[])
2810 {
2811 if (numParas<1)
2812 return SetResponse(openTag+"Error:Missing Parameter");
2813 else
2814 {
2815 CStdString strInfo = "";
2816 int i;
2817 for (i=0; i<numParas; i++)
2818 {
2819 CStdString strTemp = (CStdString) g_infoManager.GetLabel(g_infoManager.TranslateString(paras[i]));
2820 if (strTemp.IsEmpty())
2821 strTemp = "Error:No information retrieved for " + paras[i];
2822 strInfo += openTag + strTemp;
2823 }
2824 if(strInfo.Find("�") && strInfo.Find("�"))
2825 {
2826 // The Charset Converter ToUtf8() will add. only in this case= "�" a char "°" during converting,
2827 // which is the right value for the GUI!
2828 // A length depending fix in CCharsetConverter:tringCharsetToUtf8() will couse a wrong char in GUI.
2829 // So just for http, we remove the "�", to fix BUG ID:[1586251]
2830 strInfo.Replace("�","");
2831 }
2832 return SetResponse(strInfo);
2833 }
2834 }
I fail to understand the logic of line 2824 in XBMChttp.cpp
2824 if(strInfo.Find("�") && strInfo.Find("�"))
why do we find the same thing twice?
From:
http://xbmc.svn.sourceforge.net/viewvc/x...iew=markup
2809 int CXbmcHttp::xbmcGetSystemInfoByName(int numParas, CStdString paras[])
2810 {
2811 if (numParas<1)
2812 return SetResponse(openTag+"Error:Missing Parameter");
2813 else
2814 {
2815 CStdString strInfo = "";
2816 int i;
2817 for (i=0; i<numParas; i++)
2818 {
2819 CStdString strTemp = (CStdString) g_infoManager.GetLabel(g_infoManager.TranslateString(paras[i]));
2820 if (strTemp.IsEmpty())
2821 strTemp = "Error:No information retrieved for " + paras[i];
2822 strInfo += openTag + strTemp;
2823 }
2824 if(strInfo.Find("�") && strInfo.Find("�"))
2825 {
2826 // The Charset Converter ToUtf8() will add. only in this case= "�" a char "°" during converting,
2827 // which is the right value for the GUI!
2828 // A length depending fix in CCharsetConverter:tringCharsetToUtf8() will couse a wrong char in GUI.
2829 // So just for http, we remove the "�", to fix BUG ID:[1586251]
2830 strInfo.Replace("�","");
2831 }
2832 return SetResponse(strInfo);
2833 }
2834 }
I fail to understand the logic of line 2824 in XBMChttp.cpp
2824 if(strInfo.Find("�") && strInfo.Find("�"))
why do we find the same thing twice?