diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Menu.cxx | 2 | ||||
| -rw-r--r-- | src/fl_utf.c | 22 | ||||
| -rw-r--r-- | src/xutf8/case.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 661684c35..1b9df5f83 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -350,7 +350,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, if (w1 > W) W = w1; // calculate the maximum width of all shortcuts if (m->shortcut_) { - // s is a pointerto the utf8 string for the entire shortcut + // s is a pointer to the UTF-8 string for the entire shortcut // k points only to the key part (minus the modifier keys) const char *k, *s = fl_shortcut_label(m->shortcut_, &k); if (fl_utf_nb_char((const unsigned char*)k, (int) strlen(k))<=4) { diff --git a/src/fl_utf.c b/src/fl_utf.c index e98506388..46d13959d 100644 --- a/src/fl_utf.c +++ b/src/fl_utf.c @@ -3,7 +3,7 @@ * * This is the utf.c file from fltk2 adapted for use in my fltk1.1 port */ -/* Copyright 2006-2011 by Bill Spitzak and others. +/* Copyright 2006-2015 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this @@ -59,7 +59,7 @@ /** @} */ #endif /* 0 */ -/*!Set to 1 to turn bad UTF8 bytes into ISO-8859-1. If this is to zero +/*!Set to 1 to turn bad UTF-8 bytes into ISO-8859-1. If this is zero they are instead turned into the Unicode REPLACEMENT CHARACTER, of value 0xfffd. If this is on fl_utf8decode() will correctly map most (perhaps all) @@ -69,7 +69,7 @@ */ #define ERRORS_TO_ISO8859_1 1 -/*!Set to 1 to turn bad UTF8 bytes in the 0x80-0x9f range into the +/*!Set to 1 to turn bad UTF-8 bytes in the 0x80-0x9f range into the Unicode index for Microsoft's CP1252 character set. You should also set ERRORS_TO_ISO8859_1. With this a huge amount of more available text (such as all web pages) are correctly converted @@ -118,7 +118,7 @@ static unsigned short cp1252[32] = { if (*p & 0x80) { // what should be a multibyte encoding code = fl_utf8decode(p,end,&len); if (len<2) code = 0xFFFD; // Turn errors into REPLACEMENT CHARACTER - } else { // handle the 1-byte utf8 encoding: + } else { // handle the 1-byte UTF-8 encoding: code = *p; len = 1; } @@ -208,7 +208,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) byte of the error is an individual character. \e start is the start of the string and is used to limit the - backwards search for the start of a utf8 character. + backwards search for the start of a UTF-8 character. \e end is the end of the string and is assumed to be a break between characters. It is assumed to be greater than p. @@ -216,7 +216,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len) This function is for moving a pointer that was jumped to the middle of a string, such as when doing a binary search for a position. You should use either this or fl_utf8back() depending - on which direction your algorithim can handle the pointer + on which direction your algorithm can handle the pointer moving. Do not use this to scan strings, use fl_utf8decode() instead. */ @@ -532,12 +532,12 @@ unsigned fl_utf8towc(const char* src, unsigned srclen, If the UTF-8 decodes to a character greater than 0xff then it is replaced with '?'. - Errors in the UTF-8 are converted as individual bytes, same as + Errors in the UTF-8 sequence are converted as individual bytes, same as fl_utf8decode() does. This allows ISO-8859-1 text mistakenly identified - as UTF-8 to be printed correctly (and possibly CP1512 on Windows). + as UTF-8 to be printed correctly (and possibly CP1252 on Windows). - \p src points at the UTF-8, and \p srclen is the number of bytes to - convert. + \p src points at the UTF-8 sequence, and \p srclen is the number of + bytes to convert. Up to \p dstlen bytes are written to \p dst, including a null terminator. The return value is the number of bytes that would be @@ -629,7 +629,7 @@ unsigned fl_utf8fromwc(char* dst, unsigned dstlen, /* surrogate pair */ unsigned ucs2 = src[i++]; ucs = 0x10000U + ((ucs&0x3ff)<<10) + (ucs2&0x3ff); - /* all surrogate pairs turn into 4-byte utf8 */ + /* all surrogate pairs turn into 4-byte UTF-8 */ #else } else if (ucs >= 0x10000) { if (ucs > 0x10ffff) { diff --git a/src/xutf8/case.c b/src/xutf8/case.c index 6acb91596..f55d08e36 100644 --- a/src/xutf8/case.c +++ b/src/xutf8/case.c @@ -16,7 +16,7 @@ */ /* - * This file is required on all platforms for utf8 support + * This file is required on all platforms for UTF-8 support */ #include "headers/case.h" |
