Running `New-SampleModule` creates invalid characters in source/MyModule.psd1 when in a German environment (Sampler 0.119.2, PS 5.1)
- Dominant language
- PowerShell
- Stars
- 243
- Forks
- 46
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 1
Description
### Problem description
Running `New-SampleModule` in a German environment results in invalid (unexpected UTF8) characters (Mojibake) in source/MyModule.psd1 .
### Verbose logs
```text
#
# Modulmanifest für das Modul "MyModule"
#
# Generiert von: oleschri
#
# Generiert am: 07.04.2026
#
@{
# Die diesem Manifest zugeordnete Skript- oder Binärmoduldatei.
RootModule = 'MyModule.psm1'
# Die Versionsnummer dieses Moduls
ModuleVersion = '0.1.0'
# Unterstützte PSEditions
# CompatiblePSEditions = @()
# ID zur eindeutigen Kennzeichnung dieses Moduls
GUID = '7bdf6b2d-e618-40d9-9875-2a13dfcfa912'
# Autor dieses Moduls
Author = 'oleschri'
# Company or vendor of this module
CompanyName = 'oleschri'
# Urheberrechtserklärung für dieses Modul
Copyright = '(c) 2026 oleschri. Alle Rechte vorbehalten.'
```
### How to reproduce
Example:
```powershell
New-SampleModule -DestinationPath . -ModuleType CompleteSample -ModuleAuthor oleschri -ModuleName MyModule -ModuleDescription TBD -ModuleVersion 0.1.0 -LicenseType MIT -Verbose
```
source/MyModule.psd1:
It does not matter if being run inside VS Code in a terminal or the Windows 11 terminal.
### Expected behavior
Creates .psd1 with only valid (expected UTF8) characters.
### Current behavior
Creates .psd1 with invalid (unexpected UTF8) characters.
### Suggested solution
-
### Operating system the target node is running
```text
Microsoft Windows 11 Enterprise
EnterpriseEdition
64-Bit
2009
26100.1.amd64fre.ge_release.240331-1435
de-DE
{de-DE, en-US}
```
### PowerShell version and build the target node is running
```text
PS 5.1.26100.7462
```
### Module version used
```text
Sampler 0.119.2
```
Contributor guide
Research direction
Start by reproducing New-SampleModule on PowerShell 5.1 in a German environment and inspect the generated source/MyModule.psd1. Trace how the module manifest content is generated and written, then verify that the output contains valid German characters without mojibake and remains a usable manifest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100