RCall.jl and Unicode

R on Windows does not seem to support unicode (UTF-8), at least not the non-experimental versions.
I am currently doing a workaround where I copy all unicode arguments in Julia to ascii before passing them to R via RCall.jl (see first line in the function below).
Clearly not a great solution with extra storage. Any advice on how to solve this more elegantly? I could of course use only ascii in the julia function arguments directly, but that would make the user experience and docs less friendly.

function artsim(n, d, λ, ϕ, θ, μ, σ)
    lambda = λ; phi = ϕ; theta = θ; mu = μ; sigma = σ; # No unicode in R-Windows 🤦‍♂️
    R"""
        library(artfima)
        x = artsim($n, $d, $lambda, $phi, $theta, $mu, $sigma)
    """
    @rget x
return x
end

What do you mean “extra storage”? Just creating new bindings won’t allocate if that’s what you’re worried about.

1 Like

Yes, of course, you’re right. But it clutters the code. Is there a better way, or do I just live with this?