Permalink
Browse files

Added Unicode 6.3 support (and beyond)

- N0 support
- Isolate character support (LRI, RLI, FSI)
- Added test program test.c by Behdad that tests BidiTest.txt
  compliance.
- Added test program test-character.c that tests BidiCharacterTest.txt
  compliance.
  • Loading branch information...
dov committed Aug 1, 2017
1 parent 654e3f3 commit f20b6480b9cd46dae8d82a6f95d9c53558fcfd20
Showing with 2,494 additions and 212 deletions.
  1. +5 −0 NEWS
  2. +1 −1 README
  3. +8 −4 THANKS
  4. +1 −1 bin/fribidi-benchmark.c
  5. +1 −1 bin/fribidi-main.c
  6. +33 −5 charset/fribidi-char-sets-cap-rtl.c
  7. +1 −1 charset/fribidi-char-sets-cap-rtl.h
  8. +1 −1 charset/fribidi-char-sets-cp1255.c
  9. +1 −1 charset/fribidi-char-sets-cp1255.h
  10. +1 −1 charset/fribidi-char-sets-cp1256.c
  11. +1 −1 charset/fribidi-char-sets-cp1256.h
  12. +1 −1 charset/fribidi-char-sets-iso8859-6.c
  13. +1 −1 charset/fribidi-char-sets-iso8859-6.h
  14. +1 −1 charset/fribidi-char-sets-iso8859-8.c
  15. +1 −1 charset/fribidi-char-sets-iso8859-8.h
  16. +1 −1 charset/fribidi-char-sets-list.h
  17. +1 −1 charset/fribidi-char-sets-utf8.c
  18. +1 −1 charset/fribidi-char-sets-utf8.h
  19. +1 −1 charset/fribidi-char-sets.c
  20. +1 −1 charset/fribidi-char-sets.h
  21. +6 −5 configure.ac
  22. +1 −2 doc/Makefile.am
  23. +27 −0 fribidi-vs-unicode/Makefile.am
  24. +409 −0 fribidi-vs-unicode/test-character.c
  25. +391 −0 fribidi-vs-unicode/test.c
  26. +31 −1 gen.tab/Makefile.am
  27. +1 −1 gen.tab/gen-arabic-shaping-tab.c
  28. +1 −1 gen.tab/gen-bidi-type-tab.c
  29. +345 −0 gen.tab/gen-brackets-tab.c
  30. +238 −0 gen.tab/gen-brackets-type-tab.c
  31. +1 −1 gen.tab/gen-joining-type-tab.c
  32. +1 −1 gen.tab/gen-mirroring-tab.c
  33. +1 −1 gen.tab/gen-unicode-version.c
  34. +1 −0 lib/Headers.mk
  35. +6 −3 lib/Makefile.am
  36. +1 −1 lib/bidi-types.h
  37. +4 −4 lib/common.h
  38. +9 −1 lib/debug.h
  39. +1 −1 lib/fribidi-arabic.c
  40. +1 −1 lib/fribidi-arabic.h
  41. +5 −1 lib/fribidi-bidi-types-list.h
  42. +1 −1 lib/fribidi-bidi-types.c
  43. +28 −3 lib/fribidi-bidi-types.h
  44. +621 −60 lib/fribidi-bidi.c
  45. +3 −1 lib/fribidi-bidi.h
  46. +106 −0 lib/fribidi-brackets.c
  47. +90 −0 lib/fribidi-brackets.h
  48. +1 −1 lib/fribidi-common.h
  49. +12 −3 lib/fribidi-deprecated.c
  50. +3 −1 lib/fribidi-deprecated.h
  51. +1 −1 lib/fribidi-flags.h
  52. +1 −1 lib/fribidi-joining-types-list.h
  53. +1 −1 lib/fribidi-joining-types.c
  54. +1 −1 lib/fribidi-joining-types.h
  55. +1 −2 lib/fribidi-joining.c
  56. +1 −1 lib/fribidi-joining.h
  57. +1 −1 lib/fribidi-mem.c
  58. +2 −2 lib/fribidi-mirroring.c
  59. +2 −2 lib/fribidi-mirroring.h
  60. +20 −57 lib/fribidi-run.c
  61. +1 −1 lib/fribidi-shape.c
  62. +1 −1 lib/fribidi-shape.h
  63. +12 −2 lib/fribidi-types.h
  64. +11 −4 lib/fribidi-unicode.h
  65. +2 −5 lib/fribidi.c
  66. +2 −1 lib/fribidi.h
  67. +1 −1 lib/joining-types.h
  68. +1 −1 lib/mem.h
  69. +7 −6 lib/run.h
  70. +8 −0 test/test_CapRTL_isolate.input
  71. +8 −0 test/test_CapRTL_isolate.reference
View
5 NEWS
@@ -1,3 +1,8 @@
Overview of changes between 0.19.6 and 0.19.8
=============================================
* Full isolate and parenthesis support as per Unicode 6.3
* This version is not backwards compatible.

This comment has been minimized.

Show comment
Hide comment
@orivej

orivej Dec 16, 2017

Typo: 0.19.6 should be 0.19.7.

Is the current master only binary incompatible with 0.19.7 (and it is enough to recompile dependent projects), or there are source level incompatibilities (and the source code of dependent projects has to be changed)?

@orivej

orivej Dec 16, 2017

Typo: 0.19.6 should be 0.19.7.

Is the current master only binary incompatible with 0.19.7 (and it is enough to recompile dependent projects), or there are source level incompatibilities (and the source code of dependent projects has to be changed)?

Overview of changes between 0.19.6 and 0.19.7
=============================================
* Disable thread-unsafe memory pool by default. (bug #79385)
View
2 README
@@ -58,7 +58,7 @@ along with GNU FriBidi, in a file named COPYING; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
For licensing issues, contact <license@farsiweb.info>.
For licensing issues, contact <fribidi.license@gmail.com>.
Implementation
==============
View
12 THANKS
@@ -3,16 +3,20 @@ Thanks to:
Behnam Esfahbod <behnam@esfahbod.info>
* Testing and auditing code.
Dov Grobgeld <dov.grobgeld@gmail.com>
* Initial author, maintainer before the 0.9 releases. Implementation
of the BiDi algorithms changes in Unicode 6.3.
Behdad Esfahbod <behdad@behdad.org>
* Maintainer. Author of the entire 0.9 release series up to Unicode 6.3
support.
And for the previous versions of FriBidi (pre 2002), thanks to:
And for the previous versions of FriBidi (pre 2002), thanks to:
Tomas Frydrych <tomas@frydrych.uklinux.net>
* Contirbuted patches for compiling GNU FriBidi under other OSes.
Dov Grobgeld <dov.grobgeld@gmail.com>
* Initial author, and maintainer before the 0.9 releases.
Franck Portaneri
* For the Mozilla BiDi languges support document;
View
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
View
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -64,7 +64,7 @@ enum
static FriBidiCharType CapRTLCharTypes[] = {
/* *INDENT-OFF* */
ON, ON, ON, ON, LTR,RTL,ON, ON, ON, ON, ON, ON, ON, BS, RLO,RLE, /* 00-0f */
LRO,LRE,PDF,WS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, /* 10-1f */
LRO,LRE,PDF,WS, LRI, RLI, FSI, PDI, ON, ON, ON, ON, ON, ON, ON, ON, /* 10-1f */
WS, ON, ON, ON, ET, ON, ON, ON, ON, ON, ON, ET, CS, ON, ES, ES, /* 20-2f */
EN, EN, EN, EN, EN, EN, AN, AN, AN, AN, CS, ON, ON, ON, ON, ON, /* 30-3f */
RTL,AL, AL, AL, AL, AL, AL, RTL,RTL,RTL,RTL,RTL,RTL,RTL,RTL,RTL, /* 40-4f */
@@ -216,6 +216,18 @@ fribidi_cap_rtl_to_unicode (
case 'R':
us[j++] = FRIBIDI_CHAR_RLO;
break;
case 'i':
us[j++] = FRIBIDI_CHAR_LRI;
break;
case 'y':
us[j++] = FRIBIDI_CHAR_RLI;
break;
case 'f':
us[j++] = FRIBIDI_CHAR_FSI;
break;
case 'I':
us[j++] = FRIBIDI_CHAR_PDI;
break;
case '_':
us[j++] = '_';
break;
@@ -248,8 +260,9 @@ fribidi_unicode_to_cap_rtl (
for (i = 0; i < len; i++)
{
FriBidiChar ch = us[i];
if (!FRIBIDI_IS_EXPLICIT (fribidi_get_bidi_type (ch)) && ch != '_'
&& ch != FRIBIDI_CHAR_LRM && ch != FRIBIDI_CHAR_RLM)
if (!FRIBIDI_IS_EXPLICIT (fribidi_get_bidi_type (ch))
&& !FRIBIDI_IS_ISOLATE (fribidi_get_bidi_type (ch))
&& ch != '_' && ch != FRIBIDI_CHAR_LRM && ch != FRIBIDI_CHAR_RLM)
s[j++] = fribidi_unicode_to_cap_rtl_c (ch);
else
{
@@ -277,6 +290,18 @@ fribidi_unicode_to_cap_rtl (
case FRIBIDI_CHAR_RLO:
s[j++] = 'R';
break;
case FRIBIDI_CHAR_LRI:
s[j++] = 'i';
break;
case FRIBIDI_CHAR_RLI:
s[j++] = 'y';
break;
case FRIBIDI_CHAR_FSI:
s[j++] = 'f';
break;
case FRIBIDI_CHAR_PDI:
s[j++] = 'I';
break;
case '_':
s[j++] = '_';
break;
@@ -333,7 +358,10 @@ fribidi_char_set_desc_cap_rtl (
" * _> LRM\n" " * _< RLM\n"
" * _l LRE\n" " * _r RLE\n"
" * _L LRO\n" " * _R RLO\n"
" * _o PDF\n" " * __ `_' itself\n" "\n");
" * _o PDF\n" " * _i LRI\n"
" * _y RLI\n" " * _f FSI\n"
" * _I PDI\n" " * __ `_' itself\n"
"\n");
return s;
}
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_CAP_RTL_H
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_CP1255_H
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_CP1256_H
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_ISO8859_6_H
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_ISO8859_8_H
@@ -29,7 +29,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
/* *INDENT-OFF* */
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_UTF8_H
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#include <common.h>
@@ -30,7 +30,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*
* For licensing issues, contact <license@farsiweb.info>.
* For licensing issues, contact <fribidi.license@gmail.com>.
*/
#ifndef _FRIBIDI_CHAR_SETS_H
#define _FRIBIDI_CHAR_SETS_H
View
@@ -28,10 +28,10 @@ dnl FRIBIDI_BINARY_AGE = FRIBIDI_INTERFACE_AGE = 0;
dnl
m4_define(fribidi_major_version, 0)dnl
m4_define(fribidi_minor_version, 19)dnl
m4_define(fribidi_micro_version, 7)dnl
m4_define(fribidi_interface_version, 3)dnl
m4_define(fribidi_interface_age, 6)dnl
m4_define(fribidi_binary_age, 3)dnl
m4_define(fribidi_micro_version, 8)dnl
m4_define(fribidi_interface_version, 4)dnl
m4_define(fribidi_interface_age, 0)dnl
m4_define(fribidi_binary_age, 0)dnl
dnl
m4_define(fribidi_version,
m4_if(m4_eval(fribidi_micro_version()),0,
@@ -213,5 +213,6 @@ AC_CONFIG_FILES([fribidi.pc
lib/Makefile
bin/Makefile
doc/Makefile
test/Makefile])
test/Makefile
fribidi-vs-unicode/Makefile])
AC_OUTPUT
View
@@ -40,8 +40,7 @@ man3 = $(dist_man_MANS) $(dist_noinst_MANS)
C2MANFLAGS = $(includepath) \
-D__FRIBIDI_DOC \
-DDONT_HAVE_FRIBIDI_CONFIG_H \
-M "Programmer's Manual" \
-m "$(PACKAGE_NAME) $(PACKAGE_VERSION)"
-M "Programmer's Manual"
VPATH += $(includevpath)
@@ -0,0 +1,27 @@
TESTS_ENVIRONMENT = \
srcdir=${srcdir}; export srcdir; \
top_builddir=${top_builddir}; export top_builddir; \
EXEEXT=${EXEEXT}; export EXEEXT;
AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT)
AM_CPPFLAGS = \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/charset \
$(MISC_CFLAGS)
LDADD = $(top_builddir)/lib/libfribidi.la $(MISC_LIBS)
if FRIBIDI_USE_GLIB
check_PROGRAMS = test test-character
bin_PROGRAMS = $(check_PROGRAMS)
#TESTS = \
# test \
# test-character
endif
test_SOURCES = test.c
test_character_SOURCES = test-character.c
-include $(top_srcdir)/git.mk
Oops, something went wrong.

0 comments on commit f20b648

Please sign in to comment.