From 92d74190f6a747e3f7bc03bd68850ada0697607f Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 13 Sep 2025 19:02:49 +0200 Subject: [PATCH 1/3] Allow more characters in file names --- objects/objects.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/objects.go b/objects/objects.go index 6160fc7..6363188 100644 --- a/objects/objects.go +++ b/objects/objects.go @@ -322,8 +322,8 @@ func (o *objConfig) printToFile(filepath string, p *Printer) error { } func (o *objConfig) getAGoodFileName() string { - // only let alphanumberic, _, -, be put into names - reg := regexp.MustCompile("[^a-zA-Z0-9_-]+") + // This allows any letter or number from any language, plus _ and - + reg := regexp.MustCompile(`[^\p{L}\p{N}_-]+`) keyname, err := o.tryGetNonEmptyStr("Nickname") if err != nil { From 3ee3d0059daaa30e9f2f40927ce9de668a4d8f40 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 13 Sep 2025 19:08:11 +0200 Subject: [PATCH 2/3] added exclamation mark --- objects/objects.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/objects.go b/objects/objects.go index 6363188..7346b1b 100644 --- a/objects/objects.go +++ b/objects/objects.go @@ -322,8 +322,8 @@ func (o *objConfig) printToFile(filepath string, p *Printer) error { } func (o *objConfig) getAGoodFileName() string { - // This allows any letter or number from any language, plus _ and - - reg := regexp.MustCompile(`[^\p{L}\p{N}_-]+`) + // This allows any letter or number from any language, plus _, -, and ! + reg := regexp.MustCompile(`[^\p{L}\p{N}_!-]+`) keyname, err := o.tryGetNonEmptyStr("Nickname") if err != nil { From f9d9d6cbbfa79e33b2c942ed0ee9bc4de6069b1a Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 13 Sep 2025 19:46:35 +0200 Subject: [PATCH 3/3] updated tests --- objects/objects_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/objects/objects_test.go b/objects/objects_test.go index ca0b814..aacb3b9 100644 --- a/objects/objects_test.go +++ b/objects/objects_test.go @@ -404,7 +404,14 @@ func TestName(t *testing.T) { "Name": "Card", }, guid: "010509", - want: "OccultInvocation.010509", + want: "OccultInvocation!!!!.010509", + }, { + data: types.J{ + "Nickname": "Verschwörung der Äxte!", + "Name": "Card", + }, + guid: "010511", + want: "VerschwörungderÄxte!.010511", }, { data: types.J{ "Name": "Card",