Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I exported a list of characters say:

Export["hello.txt", {t, r, $\theta$, $\phi$}, "List"];

the file has the correct symbols when opened with a text editor, however, when I imported it with Mathematica:

old = Import["hello.txt", "List"]

I get:

{t, r, θ, φ}

Any idea of How can I recover the original symbols?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You have to specify the correct character encoding:

Export["hello.txt", {t, r, θ, ϕ}, "List"];

old = Import["hello.txt", "List", CharacterEncoding -> "UTF8"]

(* ==> {"t", "r", "θ", "ϕ"} *)
share|improve this answer
    
oh perfect it worked!, many thankx! –  Gluoncito Jul 28 '13 at 2:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.