语言设置为英文,扫描时是不进行编码设置的。修改为默认编码方式为简体中文即可
1、MediaScannerClient.cpp在void MediaScannerClient::setLocale(const char* locale)方法中加入一个判断语句
void MediaScannerClient::setLocale(const char* locale)
{
LOGE("MediaScannerClient.cpp->MediaScannerClient::setLocale,本地编码格式: %s\n", locale);
if (!locale) return;
if (!strncmp(locale, "ja", 2))
mLocaleEncoding = kEncodingShiftJIS;
else if (!strncmp(locale, "ko", 2))
mLocaleEncoding = kEncodingEUCKR;
else if (!strncmp(locale, "zh", 2)) {
if (!strcmp(locale, "zh_CN")) {
// simplified chinese for mainland China
mLocaleEncoding = kEncodingGBK;
} else {
// assume traditional for non-mainland Chinese locales (Taiwan, Hong Kong, Singapore)
mLocaleEncoding = kEncodingBig5;
}
}else{
mLocaleEncoding = kEncodingGBK;
}
}
音频文件头解析信息(艺术家、名称)为乱码
最新推荐文章于 2023-01-27 19:13:52 发布