90 23 7E 8C 52 87 (修改 Me TV 增加台灣地區電子節目表中文支援)
Categories:電腦應用實務
Update: 此 patch 已經含括在 Me TV 正式發佈的 0.5.30 版裡頭。
有圖有真相…
Patch 檔:
--- me-tv-0.5.17/src/dvb_si.cc 2008-02-12 07:20:34.000000000 +0800
+++ dvb_si.cc.taiwan-epg-patched 2008-05-14 10:25:46.000000000 +0800
@@ -405,6 +405,8 @@
case 0x09: codeset = "ISO-8859-13"; break;
case 0x0A: codeset = "ISO-8859-14"; break;
case 0x0B: codeset = "ISO-8859-15"; break;
+ case 0x14: codeset = "UTF-16BE"; break;
+case 0x10:
{
@@ -456,21 +458,28 @@
{
u_char ch = buffer[index];- if (ch == 0x86 || ch == 0x87)
- {
- // Ignore formatting
- }
- else if (ch == 0x8A)
- {
- text[text_index++] = '\n';
- }
- else if (ch >= 0x80 && ch < 0xA0)
+ if (codeset == "UTF-16BE")
{
- text[text_index++] = '.';
+ text[text_index++] = ch;
}
else
{
- text[text_index++] = ch;
+ if (ch == 0x86 || ch == 0x87)
+ {
+ // Ignore formatting
+ }
+ else if (ch == 0x8A)
+ {
+ text[text_index++] = '\n';
+ }
+ else if (ch >= 0x80 && ch < 0xA0)
+ {
+ text[text_index++] = '.';
+ }
+ else
+ {
+ text[text_index++] = ch;
+ }
}index++;
@@ -488,7 +497,7 @@
&bytes_read,
&bytes_written,
&error);
-
+
if (error != NULL)
{
String message = String::format(_("Failed to convert to UTF-8: %s"), error->message);


2 comments
godmd5 ·
http://edph.itsl.com.hk/viewthread.php?tid=507&extra=page%3D1&page=3
Hiroshi Yui ·
我沒有在用 Windows,恕無法直接幫上忙。