Let $\Sigma \neq \emptyset$ be an alphabet. Is there an injective map $f: \Sigma^* \rightarrow \Sigma^*$ such that for every context-free language $L \subseteq \Sigma^*$ the set $f(L)$ is a regular language?
At first I thought there cannot be such a map, but I could not proof it and now I am starting to think that such a map could exist, but look very complicated.
Well, if the alphabet $\Sigma$ is at most countably infinite (as is often the case), then both the set $\mathcal C$ of context-free languages over $\Sigma$ and the set $\mathcal R$ of regular languages over $\Sigma$ are countably infinite. Therefore there is a bijection $g : \mathcal C \rightarrow \mathcal R$. Then, for a given language $L$, just say that $f(L) = g(L)$ if $L$ is context-free, and $f(L) = L$ otherwise. Then $f$ is injective and has the desired property.
Constructing such an $f$ explicitly seems not just complicated, but impossible (i.e., I don't think there exists a computable $f$ satisfying your requirements).
Edit: Sorry, I think I misunderstood your question. I thought $f$ had to be a function mapping languages to languages. If it maps strings to strings, what I wrote doesn't apply, of course.