PDA

View Full Version : Investigation into getting Chinese EPG in OpenPLi/enigma2



i1646tvk84423
17th January, 2013, 09:39 AM
I've succeeded in getting Chinese EPG (specifically from SG Starhub) on OpenPLi 2.1 & enigma2, and I thought I share what I found and did. I'm a newbie on the scene so don't take what I say as the absolute truth. I'm still investigating and learning.


Side note: I understand cnigma2 (created by http://freedmx.net/?79) is a mod of enigma2 to support Chinese, but all I can find are .nfi binary images. Called me paranoid but I simply don't trust software from the scene without source code. (This is the reason I chose OpenPLi in the first place.)

-- Part 1 --

Now, embedded in the DVB streams is something called DVB-SI (service information), which I read up @ http://www.dvb.org/technology/standards/a038_DVB-SI_dEN300468v1.12.1.pdf.


Side note: From section 5.2.5, you can see how your STB get its time. Using dvbsnoop (http://dvbsnoop.sourceforge.net/), I observe a TDT (time and date table) packet every 3 seconds.

Using dvbsnoop (see http://dvbsnoop.sourceforge.net/examples/example-eit.html for EIT (event info table) examples), for a Chinese programme, I see SH broadcast two short event descriptors (see section 6.2.37), one for English and one for Chinese. The ISO639 lang code for Chinese is "chi".

For non-English (or non-Latin lang), the "event_name_char" and "text_char" are to be encoded as specified in Annex A.

In Annex A.2, it says that if the first byte is less than 0x20, it denotes the encoding to be used, otherwise it is normal data.

SH violates this aspect. When the data is Chinese, it is sending it as UTF8 without putting a extra "0x15" byte (see table A.3) in front. Our STB, adhering to the spec, (including dvbsnoop) simply assumes it is normal data and uses Latin charset (ISO8859) to display it.


Example: The character "ju" is, as shown in http://www.scarfboy.com/coding/unicode-tool?s=E589A7 is encoded by three octets: 0xe5 0x89 0xa7. If the STB is aware they're UTF8, it will display these three octets as a single character; if it doesn't it will display these three octets as three separate characters, which is the case currently.


-- End of Part 1 --

i1646tvk84423
17th January, 2013, 10:12 AM
-- Part 2 --

As you know, enigma2 is the key app of our STB and controls many aspects including web server, interfacing with DVB drivers, etc. It is not the OS. The OS is GNU/Linux (which means it has a Linux kernel and GNU supporting utilities). enigma2 sits on top of this and is the main app.

It has a C++ core and a Python plugin framework.

As of around Oct 2011, DMM decides to close-source enigma2 (and also transition to enigma3 (closed source)?). DMM's enigma2 source is @ http://git.opendreambox.org/?p=enigma2.git;a=summary which you'll notice is absent of any .cpp source codes, only the include header files are available for Python plugin authors.

OpenPLi took the last available enigma2 source and fork it @ http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=summary

Coming back to our objective, EITs are streaming continuously, so for this reason, enigma2 needs to use its C++ core to capture these into its EPG cache.

When an EIT is received, epgcache.cpp (http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=blob;f=lib/dvb/epgcache.cpp;h=a2243e584d1b922ceb81e07efc539655786 9b0d9;hb=refs/heads/master) line 106 would lookup the ISO639 3-char encoding (function getCountryCodeDefaultMapping), while lines 112 & 113 calls a function called convertDVBUTF8.

getCountryCodeDefaultMapping is defined in encoding.cpp (http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=blob;f=lib/base/encoding.cpp;h=1171a1bb67750de67e2ebb87ef8e73e8a61 1683b;hb=refs/heads/master) line 86. You can see the mapping is taken from a config files in /etc/enigma2/encoding.conf in your STB. Lines 39, 50, 53 and 61 shows the four available formats acceptable in encoding.conf.

convertDVBUTF8 is defined in estring.cpp (http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=blob;f=lib/base/estring.cpp;h=46a1dddd234019aa6edb79a330a67580a1d6 9372;hb=refs/heads/master) at line 370. If SH follows the spec, line 423 would handle the extra 0x15 at the first, and send out the rest of the line as UTF8. Too bad, SH doesn't follow the DVB-SI spec.

Take a moment to analyze these 3 .cpp files, and you'll see that there is no way to support SH's Chinese EITs without modifying C++ code...

-- End of Part 2 --

i1646tvk84423
17th January, 2013, 10:58 AM
-- Part 3 --

Since you need to modify code, now's a good time to start preparing your dev environment. Follow the steps @ http://users.telenet.be/spstefansp/openpliubuntu.html for a OpenPLi 2.1 dev environment. Don't try the 3.0, it has its own set of issues which I'm not ready to tackle right now.

Similar to http://thaidreambox.bayore.net/index.php?topic=15889, you need to add

("chi zho", _("Chinese")),between line 326 & 327 in UsageConfig.py (http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=blob;f=lib/python/Components/UsageConfig.py;h=cde0028c5f192c3e96bb3db21d13f9822 7f91081;hb=refs/heads/master). Now scp the new .py files to your STB:

scp build-dm800se/tmp/sysroots/mipsel-oe-linux/usr/lib/enigma2/python/Components/UsageConfig.py root@DM800SE_IP:/usr/lib/enigma2/python/Components/And delete the previous .pyo compiled version in your STB:

rm /usr/lib/enigma2/python/Components/UsageConfig.pyo
Restart enigma2 GUI to take effect.

kill `pidof enigma2`
Update your primary & secondary EPG language as follows:

http://farm9.staticflickr.com/8092/8388310519_f690a444b9_b.jpg (http://www.flickr.com/photos/92319051@N06/8388310519/)

Because SH sends English EIT for English programmes, but both Chinese and English EIT for Chinese programmes, you'll therefore want Chinese as the primary EPG language and English as the secondary language.

-- End of Part 3 --

i1646tvk84423
17th January, 2013, 11:22 AM
-- Part 4 --

Add the following two lines after line 373 in estring.cpp (http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=blob;f=lib/base/estring.cpp;h=46a1dddd234019aa6edb79a330a67580a1d6 9372;hb=refs/heads/master):


if (table == 99)
return std::string((char*)data, len);

Recompile and a few enigma2 binaries will appear. Use "find" to find all of them. They should be of 2 sizes. Big 31MB ones that are not stripped and small 2.3MB ones that are stripped.

scp one of the 2.3MB stripped ones up to your STB:

scp build-dm800se/tmp/work/dm800se-oe-linux/enigma2-2.7+git0+551e8f8bc26d672d0213065789239194258bd758-r36/package/usr/bin/enigma2 root@DM800SE_IP:/usr/bin/
If scp complains file is busy, it is because your enigma2 is running. /sbin/init 4 to kill it before you scp.
Start or restart enigma2 to take effect.

Make your own encoding.conf:

cp /usr/share/enigma2/encoding.conf /etc/enigma2/
and add one line:

chi ISO8859-99
after line 9 in /etc/enigma2/encoding.conf

-- End of Part 4 --

i1646tvk84423
17th January, 2013, 11:48 AM
-- Part 5 --

Final piece of the puzzle.

The .ttf font /usr/share/fonts/nmsbd.ttf does not have Chinese, so you need to replace its use with a .ttf font that has Chinese. A candidate is simsun.ttf from MS.

Becareful. Your STB flash do not have much space left after OpenPLi, something like 16.9MB left. simsun.ttf is 14.6MB.

scp simsun.ttf root@DM800SE_IP:/usr/share/fonts/
Then edit the skin definition:

cd /usr/share/enigma2/PLi-HD/
vi skin.xml

On line 15, change

<font name="Regular" filename="nmsbd.ttf" scale="100"></font>
to

<font name="Regular" filename="simsun.ttf" scale="100"></font>
Start or restart enigma2.
Voil?!

http://farm9.staticflickr.com/8363/8388366089_3219890af0_b.jpg (http://www.flickr.com/photos/92319051@N06/8388366089/)


Side note: While the Chinese characters of simsun.ttf looks not bad, its English letters sux. Look at http://en.wikipedia.org/wiki/Unicode_fonts for alternatives.

-- End --

i1646tvk84423
18th January, 2013, 12:02 PM
Names of channels, specified in lamedb, can also be in Chinese UTF8. They will show when you're using a Unicode font.

Latest update: Microsoft's "Arial Unicode" looks the nicest, but it is more than 23MB big, way bigger than the ~ 17MB free space left after gjstroom's .nfi image. The next best looking font is "LiHei Pro", taken from my Mac OSX, which is what I've settled on. It is only 10MB, holds less glyphs than "Arial Unicode" but good enough for SH's Chinese so far..

flye
19th January, 2013, 01:00 PM
Omg, you're good.

one question why use chi zho?

is this hardcoded in the code for chinese?

("chi zho", _("Chinese")),


And can provide the recompiled files for the estring.cpp


Add the following two lines after line 373 in estring.cpp (http://openpli.git.sourceforge.net/git/gitweb.cgi?p=openpli/enigma2;a=blob;f=lib/base/estring.cpp;h=46a1dddd234019aa6edb79a330a67580a1d6 9372;hb=refs/heads/master):
Code: Check this link (http://mirrorchecker.com/linkchecker2.php?url=if%20%28table%20==%2099%29ret urn%20std::string%28%28char*%29data,%20len%29;)
if (table == 99) return std::string((char*)data, len);


i do not have a linux environment to compile this. Thanks a lot!

i1646tvk84423
20th January, 2013, 09:00 AM
one question why use chi zho?

is this hardcoded in the code for chinese?

("chi zho", _("Chinese")),

Normally, 1 language is one 3-letter code in ISO639, but some languages, including Chinese have 2. One is for simplified Chinese, the other for Traditional. The full list can be found at http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

SH uses only "chi" from what I can see. I put both codes just to be technically correct.

The same ISO639 codes are embedded in .mkv files that can contain multi-lang audio streams or subtitles streams.



And can provide the recompiled files for the estring.cpp

i do not have a linux environment to compile this. Thanks a lot!

1 concern is that version of your .nfi and modified engima2 binary must match. I got my .nfi latest from gjstroom ************* and my dev enironment pull down the latest source codes, so very high chance they will match.

My .nfi is dated 2013-01-15 and now, I see the latest gjstroom .nfi is already 2013-01-20.

I can put up my mod enigma2 binary later tonight, but as you can understand, no guarantees.

Ideally, you should have a dev enironment. If you can create a virtual linux machine, it will be easy.

i1646tvk84423
22nd January, 2013, 05:46 AM
And can provide the recompiled files for the estring.cpp

My enigma2 is at https://www.dropbox.com/s/q2aiiuvu84xheus/enigma2

My UsageConfig.py is at http://www.dropbox.com/s/qabfprzj9h3dsnu/UsageConfig.py

flye
22nd January, 2013, 05:09 PM
dear sir, did anyone ever told you that you're a genius?? :champions::tee:



http://i.imgur.com/ZTNAhYG.jpg


Oh man, you should have join earlier..... thanks !!!

time to dump cnigma and use my fav openpli !!




http://www.stevekmccoy.com/.a/6a00d83452063969e20128768a6326970c-800wi

i1646tvk84423
24th January, 2013, 10:08 AM
Saw your attached pic. Well done!!
Glad my investigation help.

palmy
25th January, 2013, 05:39 AM
"My enigma2 is at https://www.dropbox.com/s/q2aiiuvu84xheus/enigma2

My UsageConfig.py is at http://www.dropbox.com/s/qabfprzj9h3dsnu/UsageConfig.py"

Thanks for the explanation. As a non-coder. Is there a way for me to make those changes on my STB? (DM800HD-se)

Hopefully I can let this Chinese EPG issue be done and over with.

Thanks

lonari
26th January, 2013, 08:55 AM
Dude, great job man.
Could you get non-pli images, such as Newnigma2 to work as well?

i1646tvk84423
26th January, 2013, 02:50 PM
A major reason I showed my steps is so that others can use this knowledge and apply it to any variants of enigma2 with source code.

As u can see above, the mod is just a 2-liner here and there. I'm 99.9% sure it will work on any variant of enigma2.

lonari
26th January, 2013, 08:56 PM
i1646tvk84423, previously with dm800 i was able to get FULL english channel list and epg. But now with dm800se, i'm getting a couple chinese channels with garbage programme listing.

What should I do if I want full english?
using newnigma 3.3.2

i1646tvk84423
27th January, 2013, 06:06 AM
Look at my msg #3 above. See the pix. Set EPG Lang 1 and 2 as English.

Deep Impact
1st February, 2013, 10:47 AM
I've succeeded in getting Chinese EPG (specifically from SG Starhub) on OpenPLi 2.1 & enigma2, and I thought I share what I found and did. I'm a newbie on the scene so don't take what I say as the absolute truth. I'm still investigating and learning.

Side note: I understand cnigma2 (created by http://freedmx.net/?79) is a mod of enigma2 to support Chinese, but all I can find are .nfi binary images. Called me paranoid but I simply don't trust software from the scene without source code. (This is the reason I chose OpenPLi in the first place.)
-- Part 1 --

Now, embedded in the DVB streams is something called DVB-SI (service information), which I read up @ http://www.dvb.org/technology/standards/a038_DVB-SI_dEN300468v1.12.1.pdf.

Side note: From section 5.2.5, you can see how your STB get its time. Using dvbsnoop (dvbsnoop - DVB Stream Analyzer, MPEG Analyzer (http://dvbsnoop.sourceforge.net/)), I observe a TDT (time and date table) packet every 3 seconds.
Using dvbsnoop (see dvbsnoop - A DVB Stream Analyzer Tool, Example: Event Information Table (http://dvbsnoop.sourceforge.net/examples/example-eit.html) for EIT (event info table) examples), for a Chinese programme, I see SH broadcast two short event descriptors (see section 6.2.37), one for English and one for Chinese. The ISO639 lang code for Chinese is "chi".

For non-English (or non-Latin lang), the "event_name_char" and "text_char" are to be encoded as specified in Annex A.

In Annex A.2, it says that if the first byte is less than 0x20, it denotes the encoding to be used, otherwise it is normal data.

SH violates this aspect. When the data is Chinese, it is sending it as UTF8 without putting a extra "0x15" byte (see table A.3) in front. Our STB, adhering to the spec, (including dvbsnoop) simply assumes it is normal data and uses Latin charset (ISO8859) to display it.

Example: The character "ju" is, as shown in Unicode codepoint lookup/search tool (http://www.scarfboy.com/coding/unicode-tool?s=E589A7) is encoded by three octets: 0xe5 0x89 0xa7. If the STB is aware they're UTF8, it will display these three octets as a single character; if it doesn't it will display these three octets as three separate characters, which is the case currently.
-- End of Part 1 --
Hi TS, great to see Chinese EPG in OpenPLi image :) I'm using OpenPLI gjstroom for my DM800SE as well, i read ur post but i'm not really good in edit stuff and frankly speak, i don't understand at all how u get this done:giveup: can u guide me for a-z or can u upload all the necessary file that i can just use DCC to copy & overwrite existing file to get it work ? for ur info my current PLI image with all plugin @ 43~44mb.... and can u let me now all the directory for file replacement if possible... TQ :hello:

i1646tvk84423
1st February, 2013, 01:09 PM
Get gjstroom's OpenPLi 2.1 DM800se image dated 2013-Jan-15 here: https://www.dropbox.com/s/39vuaxhszg8sv6n/openpli-2.1-beta-dm800se-20130115-sim2-ssl84b.nfi

If your gjstroom image is not dated 2013-Jan-15, there is a chance it might not work. The further the age of your image is from 2013-Jan-15, the higher chance it will not work, cos things might have changed.
Click the POWER button on your remote, to put DM800se into standby.

This is needed, cos we don't want enigma2 to be running while we're doing all these.
Download https://www.dropbox.com/s/vkh7glxoiviy8z8/encoding.conf

FTP this file "encoding" to DM800se in directory /etc/enigma2/
Download https://www.dropbox.com/s/q2aiiuvu84xheus/enigma2

FTP this file "enigma2" to DM800se in directory /usr/bin/
Download https://www.dropbox.com/s/qabfprzj9h3dsnu/UsageConfig.py

FTP this file "UsageConfig.py" to DM800se in directory /usr/lib/enigma2/python/Components/
If you like bigger fonts for your EPG, download https://www.dropbox.com/s/30rg0xg6gkiia6o/skin.xml. Otherwise, to stay with the normal sized fonts, download https://www.dropbox.com/s/p453i96xgwzqayo/skin.xml.

FTP this file "skin.xml" to DM800se in directory /usr/share/enigma2/PLi-HD/
Download http://code.google.com/p/kingfont/downloads/detail?name=LiHei%20Pro.ttf

Rename the file from "LiHei Pro.ttf" to "liheipro.ttf"
FTP this file "liheipro.ttf" to DM800se in directory /usr/share/fonts/



Change your EPG language 1 to Chinese, and EPG language 2 to English, as shown: http://farm9.staticflickr.com/8092/8388310519_f690a444b9_b.jpg
Reboot DM800se


For extra credits, you can edit bouquet to use Chinese for Chinese channels. As far as I can tell, DreamboxEdit does not support UTF-8, so you've to use another editor.

http://farm9.staticflickr.com/8190/8435450298_1ed23fabf4_b.jpg

Note: I've enlarged the fonts to cater to old folks like myself.

Deep Impact
1st February, 2013, 03:04 PM
Get gjstroom's OpenPLi 2.1 DM800se image dated 2013-Jan-15 here: https://www.dropbox.com/s/39vuaxhszg8sv6n/openpli-2.1-beta-dm800se-20130115-sim2-ssl84b.nfi
If your gjstroom image is not dated 2013-Jan-15, there is a chance it might not work. The further the age of your image is from 2013-Jan-15, the higher chance it will not work, cos things might have changed.
Click the POWER button on your remote, to put DM800se into standby.
This is needed, cos we don't want enigma2 to be running while we're doing all these.
Download https://www.dropbox.com/s/vkh7glxoiviy8z8/encoding.conf
FTP this file "encoding" to DM800se in directory /etc/enigma2/
Download https://www.dropbox.com/s/q2aiiuvu84xheus/enigma2
FTP this file "enigma2" to DM800se in directory /usr/bin/
Download https://www.dropbox.com/s/qabfprzj9h3dsnu/UsageConfig.py
FTP this file "UsageConfig.py" to DM800se in directory /usr/lib/enigma2/python/Components/
Download https://www.dropbox.com/s/30rg0xg6gkiia6o/skin.xml
FTP this file "skin.xml" to DM800se in directory /usr/share/enigma2/PLi-HD/
Download LiHei Pro.ttf - kingfont - LiHei Pro - king????? - Google Project Hosting (http://code.google.com/p/kingfont/downloads/detail?name=LiHei%20Pro.ttf)

Rename the file from "LiHei Pro.ttf" to "liheipro.ttf"
FTP this file "liheipro.ttf" to DM800se in directory /usr/share/fonts/

Change your EPG language 1 to Chinese, and EPG language 2 to English, as shown: http://farm9.staticflickr.com/8092/8388310519_f690a444b9_b.jpg
Reboot DM800se


For extra credits, you can edit bouquet to use Chinese for Chinese channels. As far as I can tell, DreamboxEdit does not support UTF-8, so you've to use another editor.

http://farm9.staticflickr.com/8190/8435450298_1ed23fabf4_b.jpg

Note: I've enlarged the fonts to cater to old folks like myself.
thanks for your prompt reply.... appreciate :)
Just wanna check with you few more things :

(1) if i don't need the big fonts size, i don't need to ftp the part (6) right ?

(2) may i know where is openpli download chinese EPG from...? i mean be default source it can get chinese EPG after mod or i still need to download some Cnigma plugin like epg helper (EPG***21161;***25163;?)

(3) DreamboxEdit does not support UTF-8... do you know any others software can support UTF-8 on english version window ?

Thanks again :)

i1646tvk84423
1st February, 2013, 03:12 PM
Step 6 does two things: 1. Use the liheipro.ttf as the font. 2. Make font bigger. If u don't want bigger size, I'll have to give u another skin.xml

Above 9 steps is all that's required, no other plugins required. The Chinese EPG data comes from SH thru the cable. By default, your DM800se is just not showing them to u.

I've tried so I know DreamboxEdit doesn't work. Fed up, I manually edit lamedb myself. I've no answer for u hence this is a bonus activity :) perhaps others have a better answer.

Deep Impact
1st February, 2013, 03:57 PM
Step 6 does two things: 1. Use the liheipro.ttf as the font. 2. Make font bigger. If u don't want bigger size, I'll have to give u another skin.xml

Above 9 steps is all that's required, no other plugins required. The Chinese EPG data comes from SH thru the cable. By default, your DM800se is just not showing them to u.

I've tried so I know DreamboxEdit doesn't work. Fed up, I manually edit lamedb myself. I've no answer for u hence this is a bonus activity :) perhaps others have a better answer.
thanks bro.... actually i want to try it on my china satellite 6A 6B... :)

flye
1st February, 2013, 06:13 PM
i don't know if this is useful but here's a chinese version of dreamedit that i have found

http://db.tt/WSn02Chz

i1646tvk84423
2nd February, 2013, 07:40 AM
thanks bro.... actually i want to try it on my china satellite 6A 6B... :)

I've amended step #6 in the original msg, to reflect the choice of bigger fonts.

Are u in CN or SG?

avp3
8th February, 2013, 02:18 PM
I am very interesting in your work. Actually I am always looking for an clone IMG supporting Chinese EPG since clone DM800C is employed by me. I have some kind comments to your work.
1. The font you used is too large. Actually some font supporting Chinese is only 2M instead of 10 M. You can find some fonts here http://www.font5.com.cn/fontlist/fontlist_1_1.html.
2. Some Chinese DM800 owners made some IMGs supporting Chinese EPG by modifying the file libdvdsi++. Only this file is modified and I had tested that it can be applied for almost all IMGs and makes them correctly supporting Chinese EPG (the recently Openpli IMG is not supported). The only drawback is that when you use it for recording operation by EPG the machine cannot restart. Otherwise there is an error information on the screen after DM800 restarts, and the recording does not take effect. When you do not restart you DM800 after the recording operation by EPG, no error happens and the recording works perfectly.

Could you please make the related files for an openpli IMG of clone DM800, thank you for your kind help in advanced. I used your files for a clone DM800C and it cannot start. Maybe the Enigma file is different from that of DM800SE.

ppbestin
8th February, 2013, 02:44 PM
I've succeeded in getting Chinese EPG (specifically from SG Starhub) on OpenPLi 2.1 & enigma2, and I thought I share what I found and did. I'm a newbie on the scene so don't take what I say as the absolute truth. I'm still investigating and learning.


Side note: I understand cnigma2 (created by http://freedmx.net/?79) is a mod of enigma2 to support Chinese, but all I can find are .nfi binary images. Called me paranoid but I simply don't trust software from the scene without source code. (This is the reason I chose OpenPLi in the first place.)

-- Part 1 --

Now, embedded in the DVB streams is something called DVB-SI (service information), which I read up @ http://www.dvb.org/technology/standards/a038_DVB-SI_dEN300468v1.12.1.pdf.


Side note: From section 5.2.5, you can see how your STB get its time. Using dvbsnoop (dvbsnoop - DVB Stream Analyzer, MPEG Analyzer (http://dvbsnoop.sourceforge.net/)), I observe a TDT (time and date table) packet every 3 seconds.

Using dvbsnoop (see dvbsnoop - A DVB Stream Analyzer Tool, Example: Event Information Table (http://dvbsnoop.sourceforge.net/examples/example-eit.html) for EIT (event info table) examples), for a Chinese programme, I see SH broadcast two short event descriptors (see section 6.2.37), one for English and one for Chinese. The ISO639 lang code for Chinese is "chi".

For non-English (or non-Latin lang), the "event_name_char" and "text_char" are to be encoded as specified in Annex A.

In Annex A.2, it says that if the first byte is less than 0x20, it denotes the encoding to be used, otherwise it is normal data.

SH violates this aspect. When the data is Chinese, it is sending it as UTF8 without putting a extra "0x15" byte (see table A.3) in front. Our STB, adhering to the spec, (including dvbsnoop) simply assumes it is normal data and uses Latin charset (ISO8859) to display it.


Example: The character "ju" is, as shown in Unicode codepoint lookup/search tool (http://www.scarfboy.com/coding/unicode-tool?s=E589A7) is encoded by three octets: 0xe5 0x89 0xa7. If the STB is aware they're UTF8, it will display these three octets as a single character; if it doesn't it will display these three octets as three separate characters, which is the case currently.


-- End of Part 1 --
DO YOU HAVE ANEY FLASH FOR DM500C USING IN SINGAPORE

i1646tvk84423
9th February, 2013, 09:05 AM
1. The font you used is too large. Actually some font supporting Chinese is only 2M instead of 10 M. You can find some fonts here http://www.font5.com.cn/fontlist/fontlist_1_1.html.

Thanks for the info. Like I said, I'm not an expert of fonts. I simply use what I've on hand.


2. Some Chinese DM800 owners made some IMGs supporting Chinese EPG by modifying the file libdvdsi++. Only this file is modified and I had tested that it can be applied for almost all IMGs and makes them correctly supporting Chinese EPG (the recently Openpli IMG is not supported). The only drawback is that when you use it for recording operation by EPG the machine cannot restart. Otherwise there is an error information on the screen after DM800 restarts, and the recording does not take effect. When you do not restart you DM800 after the recording operation by EPG, no error happens and the recording works perfectly.

Interesting. Did these Chinese users say how/what they change so that I can learn as well.


Could you please make the related files for an openpli IMG of clone DM800, thank you for your kind help in advanced. I used your files for a clone DM800C and it cannot start. Maybe the Enigma file is different from that of DM800SE.

DM800 and DM800se have different CPU so I'm not surprised it did not work. I can probably compile for DM800; give me a week or so during this holiday season. Cheers.

avp3
9th February, 2013, 10:02 AM
Thanks for the info. Like I said, I'm not an expert of fonts. I simply use what I've on hand.



1. Interesting. Did these Chinese users say how/what they change so that I can learn as well.



2. DM800 and DM800se have different CPU so I'm not surprised it did not work. I can probably compile for DM800; give me a week or so during this holiday season. Cheers.

1. The related information is here
http://www.tvrofans.org/viewthread.php?tid=25365&highlight=dm800%2Bepg.

If you cannot read Chinese I will translate them to English later with more details. The main ideal is that most IMGs now closed their source codes. However, only one file libdvdsi++ can be applied to correctly show Chinese EPG and only that file needs to be modified. Now in the file libdvdsi++ the charts transformation function is included without other parts, for example enigma, to be modified. The unicode chart is transformed to GBK chart in this file. And I found almost all IMG (Merlin, DDD, Newnigma, Domica, Oozoon, Dream-Elite, GP3, but except the state-of-art Openpli. I love DM800 and enjoy testing different IMGs and like the abroad clone IMGs) can correctly show GBK Chinese font by applying this file. But there is one drawback in using this file, DM800 cannot restart, otherwise the planned recording will not work. This drawback makes me can not shutdown my DM800C.

Another work to successfully show Chinese GBK EPG is here
http://www.tvrofans.org/thread-25315-1-1.html
It works for most IMGs. But not all parts are correctly shown. The files including source code of py files. Maybe you can get some clues from them.

If you have problem to download these files please send message to me.

2. Whether you file support GBK Chinese font. Maybe I need the files supporting GBK EPG. I replaced "enigma" file, DM800 can boot without error. But Chinese EPG is not correctly shown. I use other way to modified other files as you mentioned.

Hope you work can solve the problem of Chinese GBK EPG showing without drawback, thus many people can obtain benefits from your work. If you success, I will introduce your works to DM800 users in China.

flye
9th February, 2013, 01:51 PM
Thanks for the info. Like I said, I'm not an expert of fonts. I simply use what I've on hand.



Interesting. Did these Chinese users say how/what they change so that I can learn as well.



DM800 and DM800se have different CPU so I'm not surprised it did not work. I can probably compile for DM800; give me a week or so during this holiday season. Cheers.


your files works on DM800 too, my box is not the SE



i have shared my image for here for everyone to enjoy your great work, hope you don't mind my friend.

http://www.digital-kaos.co.uk/forums/downloads/images/2/openpli-singapore-edition-2013-2476/

avp3
9th February, 2013, 03:44 PM
your files works on DM800 too, my box is not the SE



i have shared my image for here for everyone to enjoy your great work, hope you don't mind my friend.

Digital Kaos - Downloads - Openpli Singapore edition 2013 for DM800HD (http://www.digital-kaos.co.uk/forums/downloads/images/2/openpli-singapore-edition-2013-2476/)
Thank you for your kind share. I test it. Maybe it can show Chinese EPG from satellite, but it cannot correctly show GB2132 Chinese EPG from cable.

i1646tvk84423
10th February, 2013, 04:42 PM
I've briefly looked at the discussion on tvrofans.org. I don't fully understand how libdvbsi++ is involved. I've to spend more time on it.

At this time, my comments are:

Those guys are talking abt their situation in China right? Does it apply to SG? Even if the provider complies to DVB-SI spec, (I believe) most images do not have Unicode fonts so they will show garbage. On top of this, SG SH is not compliant, as shown in part 1 of my investigation above.

avp3
11th February, 2013, 04:31 AM
I've briefly looked at the discussion on tvrofans.org. I don't fully understand how libdvbsi++ is involved. I've to spend more time on it.

At this time, my comments are:

Those guys are talking abt their situation in China right? Does it apply to SG? Even if the provider complies to DVB-SI spec, (I believe) most images do not have Unicode fonts so they will show garbage. On top of this, SG SH is not compliant, as shown in part 1 of my investigation above.

I think the same ideal can be applied for the Chinese EPG in SG. In China they change libdvdsi++ to correctly show GBK Chinese EPG. You can also make it support Chinese EPG of SG. You change the unicode chart to Chinese chart of SG in enigma, it can also be implemented in other place, such as libdvdbsi++.

More reference can be found here.
http://blog.nj53.com/index.php/archives/36
http://blog.nj53.com/index.php/archives/33

I really hope you can solve the Chinese EPG problem where both BIG5 and GBK Chinese EPG are supported.

i1646tvk84423
20th February, 2013, 12:06 PM
if (table == 99)
return std::string((char*)data, len);


I need some clarification on the above function. What does it do?


chi ISO8859-99

What does the above -99 number symbolize? Why must it be 99 and not other no?

Thanks for clarification.

Since Starhub already gives UTF8 data, I just need
return std::string((char*)data, len);

But existing C code don't have this line, so I made my own. To trigger it, I use table = 99.

Any value will do, just have matching number in encoding.conf.

i1646tvk84423
20th February, 2013, 12:09 PM
Hi, first of all, thanks for sharing on how to get Chinese EPG in Open Pli image.

I am interested to put in the chinese channels' names in Chinese just like your snapshot. I understand that I need a chinese editor, may I know which editor are you using and which is the file to edit to see the channels to edit?

Thank you and hope to hear from you soon.

I edit by hand, don't follow me.

In the thread, someone has suggested an editor that works for Chinese. Please find the post.

avp3
19th March, 2013, 03:22 PM
Whether there is new progress on this topic.

tuxpower
22nd March, 2013, 03:17 AM
Well done i1646tvk84423 !!!

Any thoughts of contributing your changes back to the OpenPLi community? This is what open source is all about.


your files works on DM800 too, my box is not the SE



i have shared my image for here for everyone to enjoy your great work, hope you don't mind my friend.

Digital Kaos - Downloads - Openpli SG edition 2013 for DM800HD *UPDATED* (http://www.digital-kaos.co.uk/forums/downloads/images/2/openpli-singapore-edition-2013-2476/)

Well done on your part too, Flye!!!

I have a DM 800C HD PVR and it's currently running Newnigma 2 (SIM 2.01, SSL 82). I am thinking of putting your image on a USB thumbdrive (OpenPLi Wiki: How To Boot Your DM800 From A USB Stick (http://openpli.org/wiki/DM800USBBoot)).

Any chance that this image can work with SSL82? Or do I need to upgrade it to the latest SSL (eg SSL 84b)?

Thanks.

tuxpower
27th March, 2013, 09:20 AM
Answering my own post

Nevermind. I have already upgraded my box to SSL84b. I have also upgraded it to the image posted by Flye.

sneezereer
17th August, 2013, 02:13 AM
I edit by hand, don't follow me.

In the thread, someone has suggested an editor that works for Chinese. Please find the post.

How did you do it by hand? Using MSWord to input Chinese characters into lamedb via ftp ?

howpeter
31st March, 2014, 05:54 AM
Hi i1646tvk84423 (http://www.digital-kaos.co.uk/forums/members/355246-i1646tvk84423/)
Congratulation! I am very happy to hear you are able make Dm800 with OpenPLi v2.1 image to be able to display Chinese font in EPG.
Very seldom I would see live show, usually I will view them in EPG and record whatever I wanted to watch and view whenever I am free. It would really be very helpful to me if it could display Chinese font in EPG so that I do not need to check newspaper for the show?s title. Can you make it work for Dm7020Hd V2 (enigma2) with Newnigma2 v4.0.9 please? OpenPLi does not have Enigma2 image of version2. I understand there will be lots of hard work, so it would only be fair that I pay for your hard work!


Names of channels, specified in lamedb, can also be in Chinese UTF8. They will show when you're using a Unicode font.

Latest update: Microsoft's "Arial Unicode" looks the nicest, but it is more than 23MB big, way bigger than the ~ 17MB free space left after gjstroom's .nfi image. The next best looking font is "LiHei Pro", taken from my Mac OSX, which is what I've settled on. It is only 10MB, holds less glyphs than "Arial Unicode" but good enough for SH's Chinese so far..

howpeter
13th April, 2014, 12:59 AM
Hi i1646tvk84423 (http://www.digital-kaos.co.uk/forums/members/355246-i1646tvk84423/)
Recently I realized that my Dm500c and Dm800Hd are displaying (or converting) the Chinese titles of the entire Chinese program (Channels 800 and above) to English wordings in EPG. But my Dm7020Hd V2 is displaying those wording in rubbish format. Wonder why is it so? Is it because my Dm7020Hd V2 has got no Chinese selection in the Language setting?
I made a comparison between Dm7020Hd and Dm800Hd, and found the followings,
1.0 /usr/lib/enigma2/python/Components/Converter/
1.1 Delite****ogic.py - Dm7020 do not have this file
1.2 Delite****ogic.pyo ? Dm7020 do not have this file
2.0 /usr/lib/enigma2/python/Delite/ - Dm7020 do not have this folder and the following files
2.1 DeliteEpgPanel.pyo
2.2 DeliteEpgSearch.pyo
3.0 /usr/lib/enigma2/Components/Converter/ - Dm7020 have this folder
4.0 /usr/lib/enigma2/python/Screens
4.1 DeliteAnologic.py - Dm7020 do not have these files
4.2 DeliteAnologic.pyo
5.0 /usr/lib/python2.6/encodings - Dm7020 have the followings files too,
5.1 big5.py
5.2 big5.pyo
5.3 big5hkscs.py
5.4 big5hkscs.pyo
6.0 /usr/share/fonts/ - Dm7020 has this folder too,
7.0 /usr/share/zoneinfo/
7.1 Hong_Kong - Dm7020 has this file in Asia folder
8.0 /usr/share/dict/ - Dm7020 do not have this the followings files, totally empty.
8.1 channels.au
8.2 channels.it
8.3 dictionary.it
8.4 dictionary.uk
8.5 & other files

Please tell me what I should do to make it able to convert the Chinese titles to English words in EPG? Or could it be the downloading?s website of EPG in Dm800/500 are different from my Dm7020?
Please Help!
Thanks very much!

avp3
14th May, 2014, 01:32 AM
Could you make your image supporting Chinese GBK font (DM800C)? Thank you for your great work! I test this one Digital Kaos - Downloads - Openpli SG edition 2013 for DM800HD *UPDATED* (http://www.digital-kaos.co.uk/forums/downloads/images/2/openpli-singapore-edition-2013-2476/)
It does not support Chinese GBK character (fileencoding=gb18030).
259974