Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve license issue with the utf8proc code. #364

Merged
merged 5 commits into from
Feb 27, 2017
Merged

Resolve license issue with the utf8proc code. #364

merged 5 commits into from
Feb 27, 2017

Conversation

DennisHeimbigner
Copy link
Collaborator

Re: Github issue #349.

Update utf8proc.[ch] to use the version now
maintained by the Julia Language project
(https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).
The license for the previous version was
unacceptable for the Debian and Ubuntu release
systems. The new version both updates the code
and addresses the license issue.

It turns out that the utf8proc software we are using
was turned over to the Julia Language developers
and the license terms changed to allow modification.
(https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).

So the fix here is as follows:

  1. Wrap the library with a fixed interface: libdispatch/dutf8.c
    and include/ncutf8.h.
  2. Replace the existing utf8proc code with the new version
    from https://github.com/JuliaLang/utf8proc.
  3. Add a couple more test cases: nc_test/tst_utf8_validate.c
    and nc_test_utf8_phrases.c. If/when I can find a usable
    normalization test, I will incorporate that later.

DennisHeimbigner and others added 3 commits February 16, 2017 14:27
Update utf8proc.[ch] to use the version now
maintained by the Julia Language project
(https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).
The license for the previous version was
unacceptable for the Debian and Ubuntu release
systems. The new version both updates the code
and addresses the license issue.

It turns out that the utf8proc software we are using
was turned over to the Julia Language developers
and the license terms changed to allow modification.
(https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).

So the fix here is as follows:
1. Wrap the library with a fixed interface: libdispatch/dutf8.c
   and include/ncutf8.h.
2. Replace the existing utf8proc code with the new version
   from https://github.com/JuliaLang/utf8proc.
3. Add a couple more test cases: nc_test/tst_utf8_validate.c
   and nc_test_utf8_phrases.c.  If/when I can find a usable
   normalization test, I will incorporate that later.
@WardF
Copy link
Member

WardF commented Feb 17, 2017

There are some build failures on Windows with Visual Studio. I'll get them resolved and then merge this pull request.

@DennisHeimbigner
Copy link
Collaborator Author

DennisHeimbigner commented Feb 17, 2017 via email

@WardF
Copy link
Member

WardF commented Feb 17, 2017

Not a problem. The root of the issue is described here, and should be easy enough for me to fix. Attending to it now.

@DennisHeimbigner
Copy link
Collaborator Author

For what its worth, I only use a couple of the functions in utf8proc. None of the others
need to be exported.

@WardF
Copy link
Member

WardF commented Feb 27, 2017

Propagating changes from master into branch, then working on resolving this.

@WardF WardF merged commit 1603cd0 into master Feb 27, 2017
@WardF WardF deleted the utffix.dmh branch February 27, 2017 19:47
DennisHeimbigner added a commit that referenced this pull request Jun 6, 2017
This is a follow-on in that the old utf8 code was still being
used in ncgen to convert utf8->utf16 when converting cdl to Java
(see genj.c).

The new code apparently has no utf16 support, but it does have
utf32 support. Converting utf32 -> utf16 can be approximated by
truncating the 32bits to 16 bits, unless the top 16 bits are
not zero. This latter condition is unlikely to be common because
it implies use of some rather obscure characters.

So solution is to convert to utf32 and truncate to 16 bits to
get utf16. An error is reported if the high-order truncated 16
bits are not zero. If we get complaints, then I will figure out
how to convert full utf32 to a utf16 pair.

Also removed the old code from ncgen.
DennisHeimbigner added a commit that referenced this pull request Jun 19, 2017
This is a follow-on in that the old utf8 code was still being
used in ncgen to convert utf8->utf16 when converting cdl to Java
(see genj.c).

The new code apparently has no utf16 support, but it does have
utf32 support. Converting utf32 -> utf16 can be approximated by
truncating the 32bits to 16 bits, unless the top 16 bits are
not zero. This latter condition is unlikely to be common because
it implies use of some rather obscure characters.

So solution is to convert to utf32 and truncate to 16 bits to
get utf16. An error is reported if the high-order truncated 16
bits are not zero. If we get complaints, then I will figure out
how to convert full utf32 to a utf16 pair.

Other changes:
1. removed the old code from ncgen.
2. changed UTF8PROC_DLLEXPORT (in utf8proc) to EXTERNL
   and added appropriate includes. This should fix
   issue #404,
   but since we cannot duplicate the failure, I am not quite
   sure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants