Error trying to set locale

Info about system with error:

G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=12
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
root@DietPi:~# echo $G_DISTRO_NAME $G_RASPBIAN
bookworm 0
root@DietPi:~# uname --all
Linux DietPi 6.12.20+rpt-rpi-v7 #1 SMP Raspbian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) armv7l GNU/Linux
root@DietPi:~# dpkg --print-architecture
armhf
root@DietPi:~# echo $G_HW_MODEL_NAME
RPi 2 Model B (armv7l)

Fresh install on RPi2 gives the error. Worked fine minutes before with a fresh install on a RPi1 [see RPi1 OS info below]

root@DietPi:~# cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=12
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
root@DietPi:~# echo $G_DISTRO_NAME $G_RASPBIAN
bookworm 1
root@DietPi:~# uname --all
Linux DietPi 6.12.20+rpt-rpi-v6 #1 Raspbian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) armv6l GNU/Linux
root@DietPi:~# dpkg --print-architecture
armhf
root@DietPi:~# echo $G_HW_MODEL_NAME
RPi B (armv6l)

Bug report ID:

root@DietPi:~# echo $G_HW_UUID
a601387f-1c56-4154-8d9d-bbd86147e3a4

Steps to reproduce:
(1) Run dietpi-config and select “language/regional options”
(2) Select “pt-BR.UTF-8” and apply

Result:

- Command: dpkg-reconfigure -f noninteractive locales 
- Exit code: 255                                      
- DietPi version: v9.12.1 (MichaIng/master) | HW_MODEL: 2 | HW_ARCH: 2 | DISTRO: 7 
- Error log:
Generating locales (this might take a while)...        
 pt_BR.UTF-8...Segmentation fault                     
done                                                  
 C.UTF-8...Segmentation fault                         
done 
Generation complete.
*** update-locale: Error: invalid locale settings:  LANG=pt_BR.UTF-8

hmm usually this indicates some data corruption or usage of incorrect chip architecture.

@MichaIng any ideas?