Add example.
[libidn.git] / README
blob55678b809b5db7152c056c09deea70825296e831
1 Libstringprep is an implementation of the IETF stringprep
2 specification, licensed under the LGPL.
4 Currently the API include the following definitions and functions:
6 Function: extern int stringprep (char *in, int maxlen, int flags,
7                                  stringprep_profile * profile);
9      Perform stringprep on a zero terminated UTF-8 string.  Since the
10      stringprep operation can expand the string, maxlen indicate how
11      large the buffer holding the string is.  See below for valid
12      flags options.  The profile indicates processing details, see the
13      profile header files, such as stringprep_generic.h and
14      stringprep_nameprep.h for two examples.  Your application can
15      define new profiles, possibly re-using the generic stringprep
16      tables that always will be part of the library.  Note that you
17      must convert strings entered in the systems locale into UTF-8
18      before using this function.
20 Type: STRINGPREP_NO_NFKC
21 Type: STRINGPREP_NO_BIDI
23      Valid options to the FLAGS parameter of stringprep().
24      STRINGPREP_NO_NFKC disables the NFKC normalization, as well as
25      selecting the non-NFKC case folding tables. STRINGPREP_NO_BIDI
26      disables the BIDI step.
28 Macro: STRINGPREP_VERSION
30      CPP definition, a string with version of the stringprep header file.
32 Function: extern char *stringprep_check_version (char *req_version);
34      Check that the the version of the library is at minimum the one
35      given as a string in REQ_VERSION and return the actual version
36      string of the library; return NULL if the condition is not met.
37      If `NULL' is passed to this function no check is done and only the
38      version string is returned.
40 Libstringprep has at some point in time passed the self tests on the
41 following systems, but no guarantees.
43   - alphaev67-dec-osf5.0 (Tru64 UNIX C, GNU make)
44   - i686-pc-linux-gnu (Debian Sid)
45   - i686-pc-linux-gnu (RedHat 7.2)
46   - mips-sgi-irix6.5 (MIPS C compiler, GNU make)
47   - rs6000-ibm-aix4.3.2.0 (GCC 2.9-aix43-000718, GNU make)
48   - rs6000-ibm-aix4.3.2.0 (IBM C for AIX compiler, GNU make)
49   - sparc-sun-solaris2.6 (Sun WorkShop Compiler C 5.0, non-GNU make)
50   - sparc-sun-solaris2.8 (Sun WorkShop Compiler C 6.0U2, SUN make)
51   - sparc-sun-solaris2.8 (GCC 3.1, GNU make)
53 Libstringprep is unstable and in its early steps of development.  You
54 should expect it to not work as well as having security problems.
56 Things left to do below.  If you like to start working on anything,
57 please let me know so work duplication can be avoided.
59   - Optimize it, the table searching is slow (but does it matter?).
60   - Port applications to use libstringprep.
61   - Include tables for more stringprep profiles.
62   - Add texi documentation.
63   - Implement rest of IDN?  Possibly separate project.
65 For more information see <URL:http://josefsson.org/libstringprep/>.
67 Send all bug reports by electronic mail to bug-libstringprep@josefsson.org.