Informatievlaanderen / OSLO-UML-Transformer

Software components that are used within the OSLO Toolchain
MIT License
5 stars 3 forks source link

Issue with Character Encoding in output oslo-converter-uml-ea #36

Closed samuvack closed 4 months ago

samuvack commented 6 months ago

I've encountered an issue with the oslo-converter-uml-ea script I'm using. The output includes unexpected "�" characters, indicating there might be an issue with character encoding. Here's an example of the output:

      {
          "@language": "nl",
          "@value": "ge�mplementeerdMet"
        }

I've encountered this issue for the OSLO model: OSLOthema-verkeersmetingen

KristofVDB1 commented 6 months ago

Did some research into this:

We’re currently on the hardcoded version of a library called mdb-reader being version 1.2.1 . This version does not take care of the encoding of the special characters, such as ï as seen in the screenshot

The encoding issue has been brought up by other users as well: Encoding Problem · Issue #172 · andipaetzold/mdb-reader and has since been addressed. However…

As of version 2.x the owner of the library has deprecated the use of commonjs which means he only supports projects that are ESM. Release v2.0.0-next.7 · andipaetzold/mdb-reader . So even though this would probably fix the issue, it’s not immediately feasible

As a result of this, we can’t easily upgrade to a newer version of this package since it would require us to rewrite our project using ESM rather than commonjs . This would require some work to change the necessary import/export statements, as well as changes to all the package.json files. There are other options, such as to use a bundler like (Webpack, rollup,…) that would do the conversion to commonjs from ESM for us, but again, this is rather impactful.

As we noticed, in the more recent versions of Enterprise Architect, AccessDb no longer is the default DBMS but rather SQLite, which means that the use of AccessDb will be phased out over the coming years. Maybe it could be an idea to "bite the bullet" and deprecate the use of AccessDb altogether in favour of SQLite . As of writing this remark, there has not been done any research into possible issues that might arise when doing the DBMS conversion. That option might still come with issues of its own :slight_smile: . To be continued!

KristofVDB1 commented 4 months ago

This has been fixed in our most recent PR. Closing this!