xbmc 解决中文乱码问题

 难以想像xbmc默认的source会出现中文显示乱码的问题, 还是花了一点小时间研究了一下这个问题,解决方法总结如下:


1. 替换字体文件

从windows下拷贝arial.ttf 文件覆盖 media/Font/ariail.ttf, 

 use any true-type font file you like to overwrite arial.ttf, and set the default Font setting to Arial. in GUI:

System->apperance-> Font


2.  modify the toUTF8 convert function

CStdString CLocalizeStrings::ToUTF8(const CStdString& strEncoding, const CStdString& str)
{
  if (strEncoding.IsEmpty())
    return str;

  CStdString ret;
  g_charsetConverter.unknownToUTF8( str, ret);
  // g_charsetConverter.stringCharsetToUtf8(strEncoding, str, ret);
  return ret;
}

3. some addon charset is still in bad charset.

I found, the bad charset display incorrect even I open it with vim. So, i convert the file by iconv

iconv -t utf-8 <file>

take youku: default.py as a example

iconv -f gb2312 -t utf-8  default.py


至此, 文件名,目录名, addon菜单,均可以显示正常了。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值