summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile30
-rw-r--r--README.md50
-rw-r--r--tests.h2
-rw-r--r--utf8proc.c12
-rw-r--r--utf8proc.h (renamed from mojibake.h)6
5 files changed, 47 insertions, 53 deletions
diff --git a/Makefile b/Makefile
index 7f3aaa0..8517192 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# libmojibake Makefile
+# libutf8proc Makefile
CURL=curl
RUBY=ruby
@@ -7,7 +7,7 @@ MAKE=make
# settings
-cflags = -O2 -std=c99 -pedantic -Wall -fpic -DMOJIBAKE_EXPORTS $(CFLAGS)
+cflags = -O2 -std=c99 -pedantic -Wall -fpic -DUTF8PROC_EXPORTS $(CFLAGS)
cc = $(CC) $(cflags)
AR = ar
@@ -22,10 +22,10 @@ endif
all: c-library
-c-library: libmojibake.a libmojibake.$(SHLIB_EXT)
+c-library: libutf8proc.a libutf8proc.$(SHLIB_EXT)
clean:
- rm -f utf8proc.o libmojibake.a libmojibake.$(SHLIB_EXT) normtest graphemetest UnicodeData.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt NormalizationTest.txt GraphemeBreakTest.txt
+ rm -f utf8proc.o libutf8proc.a libutf8proc.$(SHLIB_EXT) normtest graphemetest UnicodeData.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt NormalizationTest.txt GraphemeBreakTest.txt
$(MAKE) -C bench clean
update: utf8proc_data.c.new
@@ -51,18 +51,18 @@ CompositionExclusions.txt:
CaseFolding.txt:
$(CURL) -O http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
-utf8proc.o: mojibake.h utf8proc.c utf8proc_data.c
+utf8proc.o: utf8proc.h utf8proc.c utf8proc_data.c
$(cc) -c -o utf8proc.o utf8proc.c
-libmojibake.a: utf8proc.o
- rm -f libmojibake.a
- $(AR) rs libmojibake.a utf8proc.o
+libutf8proc.a: utf8proc.o
+ rm -f libutf8proc.a
+ $(AR) rs libutf8proc.a utf8proc.o
-libmojibake.so: utf8proc.o
- $(cc) -shared -o libmojibake.$(SHLIB_EXT) utf8proc.o
- chmod a-x libmojibake.$(SHLIB_EXT)
+libutf8proc.so: utf8proc.o
+ $(cc) -shared -o libutf8proc.$(SHLIB_EXT) utf8proc.o
+ chmod a-x libutf8proc.$(SHLIB_EXT)
-libmojibake.dylib: utf8proc.o
+libutf8proc.dylib: utf8proc.o
$(cc) -dynamiclib -o $@ $^ -install_name $(libdir)/$@
@@ -74,13 +74,13 @@ NormalizationTest.txt:
GraphemeBreakTest.txt:
$(CURL) http://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt | $(PERL) -pe 's,÷,/,g;s,×,+,g' > $@
-normtest: normtest.c utf8proc.o mojibake.h tests.h
+normtest: normtest.c utf8proc.o utf8proc.h tests.h
$(cc) normtest.c utf8proc.o -o $@
-graphemetest: graphemetest.c utf8proc.o mojibake.h tests.h
+graphemetest: graphemetest.c utf8proc.o utf8proc.h tests.h
$(cc) graphemetest.c utf8proc.o -o $@
-printproperty: printproperty.c utf8proc.o mojibake.h tests.h
+printproperty: printproperty.c utf8proc.o utf8proc.h tests.h
$(cc) printproperty.c utf8proc.o -o $@
check: normtest NormalizationTest.txt graphemetest GraphemeBreakTest.txt
diff --git a/README.md b/README.md
index 2bf3cd4..5db6da7 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,27 @@
-# libmojibake
-[![Build Status](https://travis-ci.org/JuliaLang/libmojibake.png)](https://travis-ci.org/JuliaLang/libmojibake)
-
-[libmojibake](https://github.com/JuliaLang/libmojibake) is a
-development fork of the [utf8proc
-library](http://www.public-software-group.org/utf8proc) from Jan
+# utf8proc
+[![Build Status](https://travis-ci.org/JuliaLang/utf8proc.png)](https://travis-ci.org/JuliaLang/utf8proc)
+
+[utf8proc](https://github.com/JuliaLang/utf8proc) is a small, clean C
+library that provides Unicode normalization, case-folding, and other
+operations for data in the [UTF-8
+encoding](http://en.wikipedia.org/wiki/UTF-8). It was [initially
+developed](http://www.public-software-group.org/utf8proc) from Jan
Behrens and the rest of the [Public Software
Group](http://www.public-software-group.org/), who deserve *nearly all
-of the credit* for this package: a small, clean C library that
-provides Unicode normalization, case-folding, and other operations for
-data in the [UTF-8 encoding](http://en.wikipedia.org/wiki/UTF-8). The
-main difference from utf8proc is that the Unicode support in
-libmojibake is more up-to-date (Unicode 7 vs. Unicode 5).
-
-The reason for this fork is that utf8proc is used for basic Unicode
-support in the [Julia language](http://julialang.org/) and the Julia
-developers wanted Unicode 7 support and other features, but the Public
-Software Group is currently occupied with other projects. As we implement
-and test new features in libmojibake, we are contributing patches back
-to utf8proc with the hope that they can be merged upstream.
+of the credit* for this package. With the blessing of the Public
+Software Group, the [Julia developers](http://julialang.org/) have
+taken over development of utf8proc, since the original developers have
+moved to other projects.
+
+(utf8proc is used for basic Unicode
+support in the [Julia language](http://julialang.org/), and the Julia
+developers became involved because they wanted to add Unicode 7 support and other features.)
(The original utf8proc package also includes Ruby and PostgreSQL plug-ins.
-We removed those from libmojibake in order to focus exclusively on the C
-library for the time being. We will strive to keep API changes to a minimum,
-so libmojibake should still be usable with the old plug-in code.)
+We removed those from utf8proc in order to focus exclusively on the C
+library for the time being, but plan to add them back in or release them as separate packages.)
-Like utf8proc, the libmojibake package is licensed under the
+The utf8proc package is licensed under the
free/open-source [MIT "expat"
license](http://opensource.org/licenses/MIT) (plus certain Unicode
data governed by the similarly permissive [Unicode data
@@ -38,8 +35,8 @@ For compilation of the C library run `make`.
## General Information ##
The C library is found in this directory after successful compilation
-and is named `libmojibake.a` (for the static library) and
-`libmojibake.so` (for the dynamic library).
+and is named `libutf8proc.a` (for the static library) and
+`libutf8proc.so` (for the dynamic library).
The Unicode version being supported is 7.0.0.
@@ -58,10 +55,9 @@ strings, unless you want to allocate memory yourself.
## To Do ##
-See the Github [issues list](https://github.com/JuliaLang/libmojibake/issues).
+See the Github [issues list](https://github.com/JuliaLang/utf8proc/issues).
## Contact ##
Bug reports, feature requests, and other queries can be filed at
-the [libmojibake issues page on Github](https://github.com/JuliaLang/libmojibake/issues).
-
+the [utf8proc issues page on Github](https://github.com/JuliaLang/utf8proc/issues).
diff --git a/tests.h b/tests.h
index e3c1cf5..aee3a57 100644
--- a/tests.h
+++ b/tests.h
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdarg.h>
-#include "mojibake.h"
+#include "utf8proc.h"
size_t lineno = 0;
diff --git a/utf8proc.c b/utf8proc.c
index 15acecc..4035876 100644
--- a/utf8proc.c
+++ b/utf8proc.c
@@ -39,7 +39,7 @@
*/
-#include "mojibake.h"
+#include "utf8proc.h"
#include "utf8proc_data.c"
@@ -81,13 +81,11 @@ DLLEXPORT const int8_t utf8proc_utf8class[256] = {
#define UTF8PROC_HANGUL_S_START 0xAC00
#define UTF8PROC_HANGUL_S_END 0xD7A4
-/* in libmojibake, we append "m" to whatever version of utf8proc
- we have merged with most recently + whatever increment would
- correspond to semantic versioning rules. Currently, we use 1.2m
- since we started with utf8proc 1.1.6 and added features (Unicode 7
- support) in a backwards-compatible manner. */
+/* Should follow semantic-versioning rules (semver.org) based on API
+ compatibility. (Note that the shared-library version number will
+ be different, being based on ABI compatibility.): */
DLLEXPORT const char *utf8proc_version(void) {
- return "1.2m";
+ return "1.2-dev";
}
DLLEXPORT const char *utf8proc_errmsg(ssize_t errcode) {
diff --git a/mojibake.h b/utf8proc.h
index ce97d36..06346c8 100644
--- a/mojibake.h
+++ b/utf8proc.h
@@ -22,10 +22,10 @@
/*
- * File name: mojibake.h (formerly utf8proc.h)
+ * File name: utf8proc.h
*
* Description:
- * Header files for libmojibake, which is a mapping tool for UTF-8 strings
+ * Header files for utf8proc, which is a mapping tool for UTF-8 strings
* with following features:
* - decomposing and composing of strings
* - replacing compatibility characters with their equivalents
@@ -76,7 +76,7 @@ enum {false, true};
#include <limits.h>
#ifdef _WIN32
-# ifdef MOJIBAKE_EXPORTS
+# ifdef UTF8PROC_EXPORTS
# define DLLEXPORT __declspec(dllexport)
# else
# define DLLEXPORT __declspec(dllimport)