# FemtoCleaner in 1.x (or even 0.6)

**URL:** https://discourse.julialang.org/t/femtocleaner-in-1-x-or-even-0-6/93882
**Category:** General Usage
**Created:** [February 1, 2023, 5:33pm UTC](https://discourse.julialang.org/t/femtocleaner-in-1-x-or-even-0-6/93882 "2023-02-01T17:33:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [February 1, 2023, 5:33pm UTC](https://discourse.julialang.org/t/femtocleaner-in-1-x-or-even-0-6/93882/1 "2023-02-01T17:33:23Z")

</div>

FemtoCleaner.jl isn’t registered, nor would install, so I tried to install it in Julia 0.6 that it’s made for. I wanted to migrate some Julia 0.6 code, and believe it’s for that (the only such tool?):

```julia
julia> Pkg.add("https://github.com/JuliaComputing/FemtoCleaner.jl")
INFO: Initializing package repository /home/pharaldsson/.julia/v0.6
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:Net, curl error: Could not resolve host: github.com
)

```

I got the same error with https, thought it might be the problem, so changed to http, but as can be seen didn’t work, got somehow changed back.

I’m trying to put myself in the shoes of users that need to convert some code (fortunately increasingly rare).

How to convert (but I want to use tools):

> [@Tips for updating code for 0.7](https://discourse.julialang.org/t/tips-for-updating-code-for-0-7/9427):
>
> I’ve recently been updating a lot of code to 0.7 and have found the process significantly more painful than the 0.5 to 0.6 transition. Of course, it is always much more difficult to get coding working on 2 different versions than it is to get it working on just the latest version, so, considering that there are no breaking changes after 0.7 until 2.0, I expect many packages to abandon 0.6 altogether as soon as that is feasible. Here are a few things that you can anticipate dealing with: uni…

FYI, the code:

> **[Ruth-Aaron numbers](https://rosettacode.org/wiki/UTF-8_encode_and_decode?oldid=335462)**
>
> A Ruth–Aaron pair consists of two consecutive integers (e.g., 714 and 715) for which the sums of the prime divisors of each integer are equal. So called because...

I could figure it out, ~~or someone can offer help~~ (already did, linking to original prior to my edit there), the code is short and sweet except it no longer works (except for 0.6, that juliaup supports).

[The code in Rosetta ~~(until I get it updated…)~~ gives silent wrong results in 1.x.]

This is my first (shorter) version that works in old and new versions, and actually collect is redundant:

```julia
for t in ("A", "ö", "Ж", "€", "𝄞")
  println(t, " → ", collect(codeunits(t)))
end

```

Older version: This is my shorter version which at least errors (and works in 0.6), would like to know how/if the tool works with the original or any version:

```julia
for t in ("A", "ö", "Ж", "€", "𝄞")
  println(t, " → ", convert(Vector{UInt8}, t))
end

```
