mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
b6dfdf86a6
When ELinks runs in an X11 terminal emulator (e.g. xterm), or in GNU Screen, it tries to update the title of the window to match the title of the current document. To do this, ELinks sends an "OSC 1 ; Pt BEL" sequence to the terminal. Unfortunately, xterm expects the Pt string to be in the ISO-8859-1 charset, making it impossible to display e.g. Cyrillic characters. In xterm patch #210 (2006-03-12) however, there is a menu item and a resource that can make xterm take the Pt string in UTF-8 instead, allowing characters from all around the world. The downside is that ELinks apparently cannot ask xterm whether the setting is on or off; so add a terminal._template_.latin1_title option to ELinks and let the user edit that instead. Complete list of changes: - Add the terminal._template_.latin1_title option. But do not add that to the terminal options window because it's already rather crowded there. - In set_window_title(), take a new codepage argument. Use it to decode the title into Unicode characters, and remove only actual control characters. For example, CP437 has graphical characters in the 0x80...0x9F range, so don't remove those, even though ISO-8859-1 has control characters in the same range. Likewise, don't misinterpret single bytes of UTF-8 characters as control characters. - In set_window_title(), do not truncate the title to the width of the window. The font is likely to be different and proportional anyway. But do truncate before 1024 bytes, an xterm limit. - In struct itrm, add a title_codepage member to remember which charset the master said it was going to use in the terminal window title. Initialize title_codepage in handle_trm(), update it in dispatch_special() if the master sends the new request TERM_FN_TITLE_CODEPAGE, and use it in most set_window_title() calls; but not in the one that sets $TERM as the title, because that string was not received from the master and should consist of ASCII characters only. - In set_terminal_title(), convert the caller-provided title to ISO-8859-1 or UTF-8 if appropriate, and report the codepage to the slave with the new TERM_FN_TITLE_CODEPAGE request. The conversion can run out of memory, so return a success/error flag, rather than void. In display_window_title(), check this result and don't update caches on error. - Add a NEWS entry for all of this. |
||
---|---|---|
config | ||
contrib | ||
doc | ||
po | ||
src | ||
test | ||
Unicode | ||
.gitignore | ||
.mailmap | ||
ABOUT-NLS | ||
AUTHORS | ||
autogen.sh | ||
BUGS | ||
ChangeLog | ||
configure.in | ||
COPYING | ||
features.conf | ||
INSTALL | ||
Makefile | ||
Makefile.config.in | ||
Makefile.lib | ||
NEWS | ||
README | ||
SITES | ||
THANKS | ||
TODO |
ELinks - an advanced web browser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ELinks is an advanced and well-established feature-rich text mode web (HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly customizable and can be extended via scripts. It is very portable and runs on a variety of platforms. The ELinks official website is available at http://elinks.cz/ Please see the SITES file for mirrors or other recommended sites. If you want to install ELinks on your computer, see the INSTALL file for further instructions. A good start point is documentation files available in doc/, especially the file named index.txt. If you want to request features or report bugs, see community information at http://elinks.cz/community.html and feedback information available at http://elinks.cz/feedback.html. If you want to write some patches, please first read the doc/hacking.txt document. If you want to add a new language or update the translation for an existing one, please read po/README document. If you want to write some documentation, well, you're welcome! ;) Historical notes ~~~~~~~~~~~~~~~~ Initially, ELinks was a development version of Links (Lynx-like text WWW browser), with more liberal features policy and development style. Its purpose was to provide an alternative to Links, and to test and tune various new features, but still provide good rock-solid releases inside stable branches. Why not contribute to Links instead? Well, first I made a bunch of patches for the original Links, but Mikulas wasn't around to integrate them, so I started releasing my fork. When he came back, a significant number of them got refused because Mikulas did not like them, as he just wouldn't have any use for them himself. He wants to keep Links with a relatively closed feature set and merge only new features which he himself needs. It has advantages that the tree is very narrow and the code is small and contains very little bloat. ELinks, on the contrary, aims to provide a full-featured web browser, superior to both lynx and w3m and with the power (but not slowness and memory usage) of Mozilla, Konqueror and similar browsers. However, to prevent drastic bloating of the code, the development is driven in the course of modularization and separation of add-on modules (like cookies, bookmarks, ssl, scripting etc). For more details about ELinks history, please see http://elinks.cz/history.html If you are more interested in the history and various Links clones and versions, you can examine the website at http://links.sf.net/ vim: textwidth=80