aboutsummaryrefslogtreecommitdiff
path: root/utf8.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-28utf8_strlen: Improve performanceSteve Bennett1-4/+3
Use utf8_charlen() rather than utf8_tounicode() Note that utf8_charlen() now returns 1 instead of -1 for an invalid utf-8 start byte. Reported-by: dbohdan <dbohdan@dbohdan.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2018-09-04Tidy some signed/unsigned comparisonsSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-12-31utf8: Be more strict at rejecting invalid UTF-8 sequences.Steve Bennett1-3/+12
RFC 3629 says: Implementations of the decoding algorithm above MUST protect against decoding invalid sequences Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-03-11Fix buffer overrun in utf8_index()HummyPkg1-1/+1
2016-09-05Add utf-8 display width infoSteve Bennett1-7/+60
Needed when using linenoise line editing with utf-8 support Note that variable width support is not yet added to linenoise Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-05Update linenoise to the latest versionSteve Bennett1-2/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15utf8: remove unused utf8_charequal()Steve Bennett1-10/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-09-19Build on platforms without isasciiSteve Bennett1-0/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: Paul Fertser <fercerpav@gmail.com>
2011-12-02Extend UTF-8 support past the BMPSteve Bennett1-2/+16
Now codepoints up to U+1FFFFF are supported, including as literals with the new \u{NNNNNN} syntax (up to six hex digits) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-11-28Add support for [string totitle]Steve Bennett1-0/+9
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-10-10Simplify the way unicode case mapping is doneSteve Bennett1-28/+19
Smaller, faster and includes title-case characters. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-12Trim the size of the boostrap jimsh sourceSteve Bennett1-2/+2
By removing comments and some large blocks of unnecessary code Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-13Simplify approach for generated codeSteve Bennett1-1/+1
All generated sources are now prefixed with an underscore Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Small optimisation for utf8 case mappingSteve Bennett1-23/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-21More efficient [string trimright] and [string last]Steve Bennett1-0/+22
By searching backwards in [string trimright], even in utf-8 strings. And using binary comparison in [string list] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Update documentation to cover UTF-8 support for regexpSteve Bennett1-3/+7
Also create README.utf-8 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add UTF-8 support to JimSteve Bennett1-0/+176
Signed-off-by: Steve Bennett <steveb@workware.net.au>