summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-06-15 14:28:17 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-06-15 14:28:17 +0000
commit16944bc383f865e857843b0dbce1ffe714c3c26d (patch)
treeff97ae2ff9098ef6b8f653e08246b818e544d3e7 /src
parent5283617e6820f570132ae1978dce0fc32e7dbb1d (diff)
Fix fl_nonspacing(), explain what non-spacing characters are (STR #3159).
I also edited the mentioned README file to eliminate the most obvious error(s). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_utf8.cxx14
-rw-r--r--src/xutf8/README60
2 files changed, 34 insertions, 40 deletions
diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx
index 2ad718946..db6803588 100644
--- a/src/fl_utf8.cxx
+++ b/src/fl_utf8.cxx
@@ -356,15 +356,19 @@ int fl_latin12utf(const unsigned char *str, int len, char *buf)
/**
returns true if the character is non-spacing.
- \todo explain what non-spacing means.
+
+ Non-spacing characters in Unicode are typically combining marks like
+ tilde (~), diaresis (¨), or other marks that are added to a base
+ character, for instance 'a' (base character) + '¨' (combining mark) = 'ä'
+ (German Umlaut).
+
+ http://unicode.org/glossary/#base_character
+ http://unicode.org/glossary/#nonspacing_mark
+ http://unicode.org/glossary/#combining_character
*/
unsigned int fl_nonspacing(unsigned int ucs)
{
-#ifdef __APPLE__
- return (ucs==0x20); // FIXME: what does this really do?
-#else
return (unsigned int) XUtf8IsNonSpacing(ucs);
-#endif
}
#if defined(WIN32) && !defined(__CYGWIN__)
diff --git a/src/xutf8/README b/src/xutf8/README
index cc9c51d96..6bada4c49 100644
--- a/src/xutf8/README
+++ b/src/xutf8/README
@@ -1,50 +1,41 @@
+---------------------------------------------------------------------------
+Important note: this file is outdated (as of FLTK 1.3.x, 2012 and later).
+Many things have been changed meanwhile.
+Use all information with care!
+---------------------------------------------------------------------------
supported encodings :
---------------------
iso10646-1
-iso8859-1
-iso8859-2
-iso8859-3
-iso8859-4
-iso8859-5
-iso8859-6
-iso8859-7
-iso8859-8
-iso8859-9
+iso8859-1
+iso8859-2
+iso8859-3
+iso8859-4
+iso8859-5
+iso8859-6
+iso8859-7
+iso8859-8
+iso8859-9
iso8859-10
iso8859-11
-iso8859-13
-iso8859-14
-iso8859-15
-koi8-r
-koi8-u
-big5-0
+iso8859-13
+iso8859-14
+iso8859-15
+koi8-r
+koi8-u
+big5-0
gbk
-gb2312.1980-0
-jisx0201.1976-0
-jisx0208.1983-0
-jisx0212.1990-0
+gb2312.1980-0
+jisx0201.1976-0
+jisx0208.1983-0
+jisx0212.1990-0
ksc5601.1987-0
-symbol
+symbol
dingbats
-TIPS:
-=====
-
-You must add "-lXutf8" to the library list in your Makefile.
-
-When using "GNU autoconf" add these lines to your "configure.in" :
-
-dnl Test to see if libXutf8 is on this machine:
-XUTFLIB=
-AC_CHECK_LIB(Xutf8, XUtf8IsNonSpacing, \
- AC_DEFINE(HAVE_XUTF8) XUTFLIB=" -lXutf8", ,\
- -lX11 $X_EXTRA_LIBS)
-AC_SUBST(XUTFLIB)
-
ORIGINAL FILES :
================
@@ -64,4 +55,3 @@ export CVSROOT=anoncvs@anoncvs.xfree86.org:/cvs
cvs checkout xc/lib/X11
password: anoncvs
)
-