Re: writing greek characters to files
- To: mathgroup at smc.vnet.net
- Subject: [mg46847] Re: writing greek characters to files
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 11 Mar 2004 03:50:38 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <firstname.lastname@example.org>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
sorry, but with a bit cleaner definition like
ToString[Unevaluated[expr]] <> " = " <> ToString[expr, InputForm] <>
stream = OpenWrite["tmp.txt"];
I can't reproduce your problem. And
may do almost the same.
Scott Morrison wrote:
> I'm writing a package in which I need to save the results of various
> long calculations.
> I wrote two simple functions;
> DefinitionString[expr_]:=ToStringHeld[expr] <> " = " <>
> ToString[expr,InputForm] <> ";\n"
> Now, for example, with
> DefinitionString[b] produces the string "b = 6;\n". Great. I then
> write it to a file with, for example
> WriteString[stream, DefinitionString[b]];
> I run into problems if in the example above I replace b everywhere
> with beta (entered as <esc>b<esc> in the front-end). In this case the
> file "tmp" contains an unprintable character (pair of characters, in
> fact), whereas I'd like it to contain \[Beta] = 6;.
> If I use instead DefinitionString[\[Beta]]>>"tmp", it correctly prints
> the string, but with quotation marks, making it useless for input...
> Any suggestions?
> Thanks, Scott Morrison
Prev by Date:
mathematica and image... help me please
Next by Date:
Re: Decent Reference Guide?
Previous by thread:
writing greek characters to files
Next by thread:
Creating a symmetric matrix