On 13-01-19, gg wrote: > W dniu 19.01.2013 o 13:25 Techlive Zheng <techlivezh...@gmail.com> pisze: > > >On 13-01-19, gg wrote: > >>W dniu 19.01.2013 o 12:22 Techlive Zheng > >><techlivezh...@gmail.com> pisze: > >> > >>> Hey, I found that elinks now could display HTML file with Content-Type > >>> header set as "GBK" or "GB2312" properly, but how could I specify that > >>> to display part of a GBK encoded file with no Content-Type header set? > >>> > >>> The problem I have is that I intend to use elinks to dump HTML > >>email to > >>> text in mutt, and most of my emails are encoded in GBK or > >>GB2312 without > >>> the Content-Type header set, I can not find a way to tell elinks about > >>> the encoding of these HTML emails. > >>> > >>> I found a thread[1] that talked about displaying BIG5 encoded website, > >>> any update on that? > >>> > >>> [1]: http://thread.gmane.org/gmane.comp.web.elinks.user/1920 > >> > >>Did you try to change default codepage in Option manager? > >>press o (Option Manager) -> Document -> Charset -> Default codepage -> > >>enter gb2312 > >>Save > >Thanks, I have just tried what you said, it turns out that elinks could > >recognize GB2312 correctly, but not GBK or GB18030. > > > >I have also tried the flowing to dump the text, also, GB2312 works, but > >not GBK or GB18030. > > > > elinks -dump -eval 'set document.codepage.assume = "gb2312"' > >mutt.html > > > >As GB2312 is support now, it should not be too hard to support GBK or > >GB18030. GBK is a sub-set of GB2312, and GB18030 is a supper-set of > >GB2312, both of them are commonly used as the content type of a HTML > >email message, it is better to support them both, so the following could > >be put into the .mailcap file. > > To add a new codepage is easy. > See how the GB2312 was added in src/intl/codepage.inc. > Remember to increase N_CODEPAGES. > Prepare the patch and send to the list.
Just sent an patch to elinks-deve mailing list, please take a look. _______________________________________________ elinks-users mailing list elinks-users@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-users