Problems with recode in toolbox

Hello! when executing the following code inside a toolbox, recode gives me an error

touch deleteme.txt
recode windows1251..utf8 deleteme.txt

Can someone help me?
Thank you for your time :smiley:

Welcome to ask.:fedora:edora @javier-hm

With recode --hep you can check if you made some syntax error.

It is difficult to help if you not let us know the error message ?!
Please cut and paste it as </> Preformatted text here please.

If you not made already please read also in the #start-here section to see how to make a good request so that we can easily help you.

If I run in a terminal the attached code I get

recode: /var/home/javier/IECO/single-line-diagram/deleteme.txt failed: System detected problem in step `CP1251..UTF-8'.

This error does not occur outside a toolbox

I can imagine that you not have the same character sets and surfaces available on both sides.
First i would check which linux version you use in the toolbox and then compare the different app versions you use with recode.

Interesting to know would be on both sides which:
locales you have available and iconv version you use.

As you see on the description below, there are a lot of combinations possible.

Description : The recode tool and library convert files between character sets and surfaces.
It recognizes or produces over 200 different character sets (or about 300 if

  • : combined with an iconv library) and transliterates files between almost any
  • : pair. When exact transliteration is not possible, it gets rid of the offending
  • : character or falls back on an approximations.

I was able to reproduce this issue using Fedora Workstation 36, fully upgraded. I created a fresh toolbox with Fedora 36 as well:

toolbox create recodetest

Now, both inside and outside of the toolbox, I can verify the version of iconv and recode match exactly (2.35 and 3.7.9 respectively).

Now, the installed langpacks differ. Apparently, the Container Image does not have glibc-all-langpacks installed by default. After installing that package in the toolbox the result is still the same:

$ recode windows1251..utf8 deleteme.txt
recode: /<homedir>/deleteme.txt failed: System detected problem in step `CP1251..UTF-8'

@ilikelinux Do you have any idea on what else could be causing the error?

I can reproduce this error with podman directly (by running a Fedora 36 container). The issue is not reproducible when using an Ubuntu container, so it is probably related to the Fedora 36 image/system configuration. No idea what could be the issue though. :person_shrugging:

I asked this question in Unix&Linux as well:

They replied with a fix.

From the toolbox:

sudo dnf install -y recode glibc-gconv-extra