@dalvescb How happy are you with the way we're handling EBCDIC? I've been thinking about alternative ways of handling it:
-
At a minimum, add name_utf8 methods that convert the EBCDIC to UTF-8. I want these for implementing the objdump/readobj support. These would be implemented for all file formats, not just GOFF, so the objdump/readobj code will use this for everything. The write module would be unchanged.
-
Transparently convert between EBCDIC and UTF-8 during both read and write. We're already collecting the EBCDIC into a Vec when reading, so it would be easy to do the conversion at the same time, and the user would never see the EBCDIC. We'd still need name_utf8 methods because it wouldn't have a 'data lifetime. Then if we do that, we need to change the write module to match: names in the API would be UTF-8 (matching other file formats), and we do the conversion internally.
I think the choice mostly depends on how the GOFF support is being used. Which option would be simpler for your use?
@dalvescb How happy are you with the way we're handling EBCDIC? I've been thinking about alternative ways of handling it:
At a minimum, add
name_utf8methods that convert the EBCDIC to UTF-8. I want these for implementing theobjdump/readobjsupport. These would be implemented for all file formats, not just GOFF, so theobjdump/readobjcode will use this for everything. Thewritemodule would be unchanged.Transparently convert between EBCDIC and UTF-8 during both read and write. We're already collecting the EBCDIC into a Vec when reading, so it would be easy to do the conversion at the same time, and the user would never see the EBCDIC. We'd still need
name_utf8methods because it wouldn't have a'datalifetime. Then if we do that, we need to change thewritemodule to match: names in the API would be UTF-8 (matching other file formats), and we do the conversion internally.I think the choice mostly depends on how the GOFF support is being used. Which option would be simpler for your use?