mirror of
https://github.com/troglobit/editline.git
synced 2025-09-17 09:28:10 +08:00
Implement ignore and UTF-8
This commit is contained in:
17
docs/LOCALE.md
Normal file
17
docs/LOCALE.md
Normal file
@@ -0,0 +1,17 @@
|
||||
Locale Considerations
|
||||
=====================
|
||||
|
||||
The editline library has basic support for locales via the use of the standard
|
||||
POSIX functions `mbrtowc` and `wcwidth`. As a result, the on-screen width of
|
||||
characters in printed text should be calculated correctly, the so-called
|
||||
[East Asian ambiguous][] characters being a notable exception.
|
||||
|
||||
[East Asian ambiguous]: http://www.unicode.org/reports/tr11/tr11-38.html
|
||||
|
||||
The input handling is not yet multibyte-aware. Specifically, the presence of
|
||||
non-self-synchonizing encodings requires always segmenting the whole string
|
||||
using `mbrlen` when deleting.
|
||||
|
||||
Programs wishing to use the feature need to link to a build of `editline`
|
||||
configured with `--enable-locale`. In addition, the program should call
|
||||
`setlocale(LC_CTYPE, "")` to use the locale settings of the environment.
|
@@ -29,11 +29,9 @@ Other minor TODO's
|
||||
`el_bind_key()` exists.
|
||||
- Make `char *rl_prompt;` globally visible.
|
||||
- Add support for `rl_set_prompt()`
|
||||
- Add support for `--enable-utf8` to configure script
|
||||
- Use `strcmp(nl_langinfo(CODESET), "UTF-8")` to look for utf8 capable
|
||||
terminal
|
||||
- Implement simple UTF-8 parser according to
|
||||
http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
- Make the input multibyte-aware in `insert_string` and `delete_string`.
|
||||
|
||||
|
||||
[gnu]: http://www.delorie.com/gnu/docs/readline/rlman_41.html#IDX288
|
||||
|
Reference in New Issue
Block a user