rename back to utf8proc now that we are taking over maintenance

This commit is contained in:
Steven G. Johnson 2015-03-06 12:43:37 -05:00
parent 86447ad060
commit 402883c78e
5 changed files with 45 additions and 51 deletions

View File

@ -1,4 +1,4 @@
# libmojibake Makefile # libutf8proc Makefile
CURL=curl CURL=curl
RUBY=ruby RUBY=ruby
@ -7,7 +7,7 @@ MAKE=make
# settings # settings
cflags = -O2 -std=c99 -pedantic -Wall -fpic -DMOJIBAKE_EXPORTS $(CFLAGS) cflags = -O2 -std=c99 -pedantic -Wall -fpic -DUTF8PROC_EXPORTS $(CFLAGS)
cc = $(CC) $(cflags) cc = $(CC) $(cflags)
AR = ar AR = ar
@ -22,10 +22,10 @@ endif
all: c-library all: c-library
c-library: libmojibake.a libmojibake.$(SHLIB_EXT) c-library: libutf8proc.a libutf8proc.$(SHLIB_EXT)
clean: 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 $(MAKE) -C bench clean
update: utf8proc_data.c.new update: utf8proc_data.c.new
@ -51,18 +51,18 @@ CompositionExclusions.txt:
CaseFolding.txt: CaseFolding.txt:
$(CURL) -O http://www.unicode.org/Public/UNIDATA/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 $(cc) -c -o utf8proc.o utf8proc.c
libmojibake.a: utf8proc.o libutf8proc.a: utf8proc.o
rm -f libmojibake.a rm -f libutf8proc.a
$(AR) rs libmojibake.a utf8proc.o $(AR) rs libutf8proc.a utf8proc.o
libmojibake.so: utf8proc.o libutf8proc.so: utf8proc.o
$(cc) -shared -o libmojibake.$(SHLIB_EXT) utf8proc.o $(cc) -shared -o libutf8proc.$(SHLIB_EXT) utf8proc.o
chmod a-x libmojibake.$(SHLIB_EXT) chmod a-x libutf8proc.$(SHLIB_EXT)
libmojibake.dylib: utf8proc.o libutf8proc.dylib: utf8proc.o
$(cc) -dynamiclib -o $@ $^ -install_name $(libdir)/$@ $(cc) -dynamiclib -o $@ $^ -install_name $(libdir)/$@
@ -74,13 +74,13 @@ NormalizationTest.txt:
GraphemeBreakTest.txt: GraphemeBreakTest.txt:
$(CURL) http://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt | $(PERL) -pe 's,÷,/,g;s,×,+,g' > $@ $(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 $@ $(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 $@ $(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 $@ $(cc) printproperty.c utf8proc.o -o $@
check: normtest NormalizationTest.txt graphemetest GraphemeBreakTest.txt check: normtest NormalizationTest.txt graphemetest GraphemeBreakTest.txt

View File

@ -1,30 +1,27 @@
# libmojibake # utf8proc
[![Build Status](https://travis-ci.org/JuliaLang/libmojibake.png)](https://travis-ci.org/JuliaLang/libmojibake) [![Build Status](https://travis-ci.org/JuliaLang/utf8proc.png)](https://travis-ci.org/JuliaLang/utf8proc)
[libmojibake](https://github.com/JuliaLang/libmojibake) is a [utf8proc](https://github.com/JuliaLang/utf8proc) is a small, clean C
development fork of the [utf8proc library that provides Unicode normalization, case-folding, and other
library](http://www.public-software-group.org/utf8proc) from Jan 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 Behrens and the rest of the [Public Software
Group](http://www.public-software-group.org/), who deserve *nearly all Group](http://www.public-software-group.org/), who deserve *nearly all
of the credit* for this package: a small, clean C library that of the credit* for this package. With the blessing of the Public
provides Unicode normalization, case-folding, and other operations for Software Group, the [Julia developers](http://julialang.org/) have
data in the [UTF-8 encoding](http://en.wikipedia.org/wiki/UTF-8). The taken over development of utf8proc, since the original developers have
main difference from utf8proc is that the Unicode support in moved to other projects.
libmojibake is more up-to-date (Unicode 7 vs. Unicode 5).
The reason for this fork is that utf8proc is used for basic Unicode (utf8proc is used for basic Unicode
support in the [Julia language](http://julialang.org/) and the Julia support in the [Julia language](http://julialang.org/), and the Julia
developers wanted Unicode 7 support and other features, but the Public developers became involved because they wanted to add Unicode 7 support and other features.)
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.
(The original utf8proc package also includes Ruby and PostgreSQL plug-ins. (The original utf8proc package also includes Ruby and PostgreSQL plug-ins.
We removed those from libmojibake in order to focus exclusively on the C We removed those from utf8proc in order to focus exclusively on the C
library for the time being. We will strive to keep API changes to a minimum, library for the time being, but plan to add them back in or release them as separate packages.)
so libmojibake should still be usable with the old plug-in code.)
Like utf8proc, the libmojibake package is licensed under the The utf8proc package is licensed under the
free/open-source [MIT "expat" free/open-source [MIT "expat"
license](http://opensource.org/licenses/MIT) (plus certain Unicode license](http://opensource.org/licenses/MIT) (plus certain Unicode
data governed by the similarly permissive [Unicode data data governed by the similarly permissive [Unicode data
@ -38,8 +35,8 @@ For compilation of the C library run `make`.
## General Information ## ## General Information ##
The C library is found in this directory after successful compilation The C library is found in this directory after successful compilation
and is named `libmojibake.a` (for the static library) and and is named `libutf8proc.a` (for the static library) and
`libmojibake.so` (for the dynamic library). `libutf8proc.so` (for the dynamic library).
The Unicode version being supported is 7.0.0. The Unicode version being supported is 7.0.0.
@ -58,10 +55,9 @@ strings, unless you want to allocate memory yourself.
## To Do ## ## 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 ## ## Contact ##
Bug reports, feature requests, and other queries can be filed at 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).

View File

@ -6,7 +6,7 @@
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>
#include "mojibake.h" #include "utf8proc.h"
size_t lineno = 0; size_t lineno = 0;

View File

@ -39,7 +39,7 @@
*/ */
#include "mojibake.h" #include "utf8proc.h"
#include "utf8proc_data.c" #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_START 0xAC00
#define UTF8PROC_HANGUL_S_END 0xD7A4 #define UTF8PROC_HANGUL_S_END 0xD7A4
/* in libmojibake, we append "m" to whatever version of utf8proc /* Should follow semantic-versioning rules (semver.org) based on API
we have merged with most recently + whatever increment would compatibility. (Note that the shared-library version number will
correspond to semantic versioning rules. Currently, we use 1.2m be different, being based on ABI compatibility.): */
since we started with utf8proc 1.1.6 and added features (Unicode 7
support) in a backwards-compatible manner. */
DLLEXPORT const char *utf8proc_version(void) { DLLEXPORT const char *utf8proc_version(void) {
return "1.2m"; return "1.2-dev";
} }
DLLEXPORT const char *utf8proc_errmsg(ssize_t errcode) { DLLEXPORT const char *utf8proc_errmsg(ssize_t errcode) {

View File

@ -22,10 +22,10 @@
/* /*
* File name: mojibake.h (formerly utf8proc.h) * File name: utf8proc.h
* *
* Description: * 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: * with following features:
* - decomposing and composing of strings * - decomposing and composing of strings
* - replacing compatibility characters with their equivalents * - replacing compatibility characters with their equivalents
@ -76,7 +76,7 @@ enum {false, true};
#include <limits.h> #include <limits.h>
#ifdef _WIN32 #ifdef _WIN32
# ifdef MOJIBAKE_EXPORTS # ifdef UTF8PROC_EXPORTS
# define DLLEXPORT __declspec(dllexport) # define DLLEXPORT __declspec(dllexport)
# else # else
# define DLLEXPORT __declspec(dllimport) # define DLLEXPORT __declspec(dllimport)