[
https://issues.apache.org/jira/browse/DAFFODIL-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497475#comment-17497475
]
Mike Beckerle commented on DAFFODIL-2663:
-----------------------------------------
The end user of daffodil who needs a new charset or several should be able to
put a jar with their charset on the classpath, and that jar will have the
metadata to enable dynamic loading of that charset definition.
3 things in Daffodil already provide this dynamic loading behavior -
user-defined functions, validators, and layer transforms.
You use the service-provider interface (SPI) to make this work.
Right now, you can define a new charset in just 3 or 4 lines of scala code
under daffodil-io, but we want people to be able to add new charsets on the fly
without the need to do anything to daffodil, or in any daffodil
directory/package structure.
Search for LayerCompilerRegistry, which is a thing that loads and creates a
"registry" of all the "layer compilers".
You need to do something similar for all the charset definitions.
> charset encoders need to be pluggable
> -------------------------------------
>
> Key: DAFFODIL-2663
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2663
> Project: Daffodil
> Issue Type: Bug
> Components: Back End
> Affects Versions: 3.2.1
> Reporter: Mike Beckerle
> Assignee: Alexander Revello
> Priority: Major
> Labels: beginner
>
> We've seen an ongoing need for more and distinct charset encoders/decoders
> for new encodings.
> They need to be pluggable components, not something that requires creating a
> new release of Daffodil for.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)