Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

accent in description cause validation error #338

Closed
PinetNicolas opened this issue Sep 13, 2023 · 2 comments
Closed

accent in description cause validation error #338

PinetNicolas opened this issue Sep 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@PinetNicolas
Copy link

Description

When you put an accent in description or any field an error occurs:

com.structurizr.dsl.StructurizrDslParserException: Input length = 1
at com.structurizr.dsl.StructurizrDslParser.parse(StructurizrDslParser.java:131)
at com.structurizr.cli.export.ExportCommand.run(ExportCommand.java:131)
at com.structurizr.cli.StructurizrCliApplication.run(StructurizrCliApplication.java:81)
at com.structurizr.cli.StructurizrCliApplication.main(StructurizrCliApplication.java:119)

For a lot of field is not a problem, but i think people need to make description in french or other language with lot of special character.

Steps to reproduce

Create a file with the code sample below.

use cli to validate file : structurizr.bat validate -w .\wtest.dsl

Screenshot

No response

Code sample

workspace {
    model {
        sstest = softwareSystem "Test Application" "é"
    }
}

Configuration

I run under windows
Computer locale is french
cli version : 1.33.1
dsl version 1.32.0

Severity

Minor

Priority

Low

Resolution

I have no budget, please fix this for free

More information

I just try accent for french language on windows.

@PinetNicolas PinetNicolas added the bug Something isn't working label Sep 13, 2023
@PinetNicolas
Copy link
Author

PinetNicolas commented Sep 15, 2023

After more investigation, problem come from charset of file. Windows don't use UTF-8 by default.
The exception is : java.nio.charset.MalformedInputException. it is more explicit than "Input length = 1"

@simonbrowndotje
Copy link
Contributor

This has been fixed in the DSL parser, but also requires a change to the CLI, which will happen during the next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants