AI-Generated and AI-Assisted Code Under EU Law: Intellectual Property and Compliance Challenges
Av. Mirela Takacs · April 20, 2026 · 7 min read
This is a legal analysis of the current legal framework across European Union regarding the protection of software programs in the context of generating code using AI systems.
As a starting point of this study, I chose to begin with a presentation of relevant recent events which demonstrate how rapidly and fundamentally the way software is developed has changed, raising the question of whether the existing legal framework for protection of computer programs is still adequate to address these new challenges.
Although I started with the idea of a short blog article, given that there is a lot of information that needs to be analyzed and discussed, without which the topic could not be analyzed adequately, in the end I decided that the most appropriate option is to structure it in separate parts, logically linked to each other, which can be read individually, but which together try to explain the subject, with references to case law, legislation and scholarship. I believe that it can also be considered a multi-part guide to explore and deepen the field.
Part 1: A real-world example: the relicensing of Chardet
On March 4, 2026, Dan Blanchard released version 7.0.0 of the open-source library Chardet, a Python character encoding detector. By April 20, 2026, the Chardet library had 23 releases on GitHub, the latest being version 7.4.3[1].
The background of the Chardet project
Until version 7.0.0, the library was distributed under the LGPL license, the library being originally created and licensed by Mark Pilgrim in 2006[2]. A few years later, in 2011, Mark Pilgrim deleted all his websites and accounts from the internet[3], so, since 2012, Dan Blanchard has been the main developer responsible for the project on his own initiative, most of the commits made over the last years being his[4].
Recently, following the releases made by the main maintainer in March 2026, the project became famous in many online debates due to its licensing.
Specifically, on March 4, 2026, with the release of version 7.0.0, Dan Blanchard announced the rewrite of the library, under the MIT license, but with the same package name, the same public API, a direct replacement for chardet 5.x/6.x[5]. He made the change directly in the project’s official public repository and on the existing PyPI channel, so that the new MIT version became the default for any subsequent installations or updates.
LGPL vs. MIT
The LGPL license, applicable to all versions of Chardet up to and including 6.x, is an open-source license that allows users to use the library within their own software, particularly through dynamic linking, without requiring them to release the source code of their own codebase. Still, if the users modify the library itself, they have the obligation to make the source code public only for those modifications, without affecting the rest of their project.
This is why this license is known as a weak copyleft license because it lies at the boundary between strong copyleft licenses (such as the GPL, which requires releasing the program’s entire source code) and permissive licenses (such as MIT or BSD, which only impose attribution obligations regarding the authors of the programs, as in copyright notices, and the text of the licenses).
So, at first glance, considering the requirements of the LGPL license, it appears that any modification to the library should have been published under the LGPL license, but Dan Blanchard considers version 7.0.0 a completely new version, using the same name and the same public API, and moreover, with a later version number, so as a continuation of the initial project. He expressly specifies that it is a direct replacement for chardet 5.x/6.x.
The rewriting
Although the official release notes described it as a ground-up rewrite, without any mention of AI, the Chardet 7.0.0 rewrite was in fact carried out with Claude, as evidenced by the implementation plan retained in the official repo[6].
The document is formulated as an instruction for the AI system (“For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.“), sets as its objective the creation of a “ground-up” implementation under the MIT license, API compatible with the previous version, a functional replacement for existing software (under a different licensing regime), as well as explicit instructions with reference to the previous version of the library[7].
Reactions
And after 15 years of absence, the original author of the library Mark Pilgrim makes his public presence again and politely requests the revert of the project to the original license on the grounds that it is irrelevant that it would be a complete rewrite as long as they had access to the original code (it wasn’t a clean room implementation), and the use of AI does not give them additional rights[8].
From that point on, online debates began to emerge across various websites, platforms, and blogs, with the focus on: did the main maintainer have the right to relicense the project by himself? Can code generated with AI benefit from any kind of legal protection?
But to give you an idea of how dynamic and sensitive the field is right now, from the moment I decided to write this analysis until I managed to publish it, Dan Blanchard released other versions of Chardet, and in one of them he announced the change, again, of the project license, now from MIT to 0BSD (maximum permission), with retroactive application starting with version 7.X[9].
Later, in a very detailed post, Dan Blanchard documented on his blog the entire process of rewriting Chardet, describing how what would have optimistically taken months was completed in just five days with Claude[10]. In the meantime, the Software Freedom Conservancy organization, which deals with FOSS licensing and the application of copyleft licenses (LGPL v.1 violations in particular), announced that it is analyzing the case and will report back with the result of the investigation[11].
While the Chardet case requires analysis under US copyright law, and I will follow its evolution and return with updates, in this article, I am using it as a starting point for a broader discussion about protection of computer programs and AI under EU law.
Thus, based on the elements of Chardet case, which are real, recent, and publicly documented – demonstrating that we are no longer dealing with theoretical situations – I have analyzed the applicable EU legal provisions for content generated with AI systems in order to determine which rights – if any – apply to such works and who – if anyone – owns them, as well as the related compliance challenges.
Part 2: Terms of Service of AI platforms & EU main regulations for computer programs
Part 4: CJEU case law on computer programs
Part 5: Literal Elements vs. Non-Literal Elements in Computer Programs
[1] https://github.com/chardet/chardet
[2] https://pypi.org/project/chardet/1.0/
[3] https://meyerweb.com/eric/thoughts/2011/10/04/searching-for-mark-pilgrim/
[4] https://github.com/chardet/chardet/graphs/contributors
[5] https://github.com/chardet/chardet/releases/tag/7.0.0
[6] https://github.com/chardet/chardet/blob/925bccbc85d1b13292e7dc782254fd44cc1e7856/docs/plans/2026-02-25-chardet-rewrite-plan.md
[7] Task 3: Encoding Registry
Files:
Context: The registry maps every supported encoding to its metadata. Era assignments MUST match chardet 6.0.0’s chardet/metadata/charsets.py at https://raw.githubusercontent.com/chardet/chardet/f0676c0d6a4263827924b78a62957547fca40052/chardet/metadata/charsets.py
- Create: src/chardet/registry.py
- Create: tests/test_registry.py
Fetch that file and use it as the authoritative reference for which encodings belong to which era. Do not invent era assignments.
[8] https://github.com/chardet/chardet/issues/327
[9] https://github.com/chardet/chardet/releases/tag/7.3.0
[10] https://dan-blanchard.github.io/blog/chardet-rewrite-controversy/
[11] https://github.com/chardet/chardet/issues/355
The content of this website is provided for informational purposes only and does not constitute legal advice. The law in this area is subject to ongoing developments. Please consult a qualified lawyer for advice specific to your situation.