summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-04-05 12:55:14 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-04-05 12:55:14 +0000
commit769ebeeba74fd793c4a3cb915be34598e0dfbef1 (patch)
treeb34aea3a001fe7ab6bd3c33104ec943ae1308e38
parentf2fa59fd0f9119cc592c191431743d3291ee46f8 (diff)
Tearing my hairs out about terminology in utf-8
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7429 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl_Text_Buffer.H15
-rw-r--r--test/editor.cxx1
2 files changed, 10 insertions, 6 deletions
diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H
index a9c6bfc00..e4f2a97d6 100644
--- a/FL/Fl_Text_Buffer.H
+++ b/FL/Fl_Text_Buffer.H
@@ -34,12 +34,15 @@
#define FL_TEXT_BUFFER_H
/*
- UTF-8 terminology for this file:
-
- "length" is the number of characters in a string
- "size" is the number of bytes
- "index" is the position in a string in number of characters
- "offset" is the position in a strin in bytes (and must be kept on a charater boundary)
+ Suggested UTF-8 terminology for this file:
+
+ ?? "length" is the number of characters in a string
+ ?? "size" is the number of bytes
+ ?? "index" is the position in a string in number of characters
+ ?? "offset" is the position in a strin in bytes (and must be kept on a charater boundary)
+ (there seems to be no standard in Uncode documents, howevere "length" is commonly
+ referencing the number of bytes. Maybe "bytes" and "glyphs" would be the most
+ obvious way to describe sizes?)
"character size" is the size of a UTF-8 character in bytes
"character width" is the width of a Unicode character in pixels
diff --git a/test/editor.cxx b/test/editor.cxx
index 12cc4ccb9..3c650aab0 100644
--- a/test/editor.cxx
+++ b/test/editor.cxx
@@ -784,6 +784,7 @@ Fl_Window* new_view() {
int main(int argc, char **argv) {
textbuf = new Fl_Text_Buffer;
+ textbuf->text("Rügenwälder Ruß.");
style_init();
Fl_Window* window = new_view();