# Problems with recode in toolbox

**URL:** <https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952>\
**Category:** Ask Fedora\
**Tags:** f36, silverblue\
**Created:** [June 23, 2022, 10:15am UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952 "2022-06-23T10:15:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![javier-hm](https://avatars.discourse-cdn.com/v4/letter/j/f5a326/32.png) [@javier-hm](https://discussion.fedoraproject.org/u/javier-hm)\
**Post date:** [June 23, 2022, 10:15am UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/1 "2022-06-23T10:15:54Z")

</div>

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

```auto
touch deleteme.txt
recode windows1251..utf8 deleteme.txt

```

Can someone help me?  
Thank you for your time 😃

---

<div class="post-metadata">

**Author:** ![ilikelinux](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/ilikelinux/32/27169_2.png) [@ilikelinux](https://discussion.fedoraproject.org/u/ilikelinux)\
**Post date:** [June 23, 2022, 11:22am UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/2 "2022-06-23T11:22:39Z")

</div>

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

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

> [@javier-hm](#):
>
> Can someone help me?

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.

---

<div class="post-metadata">

**Author:** ![javier-hm](https://avatars.discourse-cdn.com/v4/letter/j/f5a326/32.png) [@javier-hm](https://discussion.fedoraproject.org/u/javier-hm)\
**Post date:** [June 23, 2022, 3:25pm UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/3 "2022-06-23T15:25:11Z")

</div>

If I run in a terminal the attached code I get

```auto
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

---

<div class="post-metadata">

**Author:** ![ilikelinux](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/ilikelinux/32/27169_2.png) [@ilikelinux](https://discussion.fedoraproject.org/u/ilikelinux)\
**Post date:** [June 23, 2022, 4:17pm UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/4 "2022-06-23T16:17:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Peque](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/peque/32/5281_2.png) [@Peque](https://discussion.fedoraproject.org/u/Peque)\
**Post date:** [June 24, 2022, 3:53pm UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/5 "2022-06-24T15:53:57Z")

</div>

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

```auto
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:

```auto
$ 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?

---

<div class="post-metadata">

**Author:** ![Peque](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/peque/32/5281_2.png) [@Peque](https://discussion.fedoraproject.org/u/Peque)\
**Post date:** [June 24, 2022, 4:11pm UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/6 "2022-06-24T16:11:05Z")

</div>

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. 🤷

---

<div class="post-metadata">

**Author:** ![Peque](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/peque/32/5281_2.png) [@Peque](https://discussion.fedoraproject.org/u/Peque)\
**Post date:** [June 24, 2022, 4:15pm UTC](https://discussion.fedoraproject.org/t/problems-with-recode-in-toolbox/67952/7 "2022-06-24T16:15:10Z")

</div>

I asked this question in Unix&Linux as well:

> <https://unix.stackexchange.com/questions/707392/error-running-recode-inside-a-container>

They replied with a fix.

From the toolbox:

```auto
sudo dnf install -y recode glibc-gconv-extra

```
