Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Chris Elvidge Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Version 5.2 patchlevel 6 Date: Sat, 23 Feb 2019 11:42:57 +0000 Organization: A noiseless patient Spider Lines: 82 Message-ID: References: <59f7fec7-639d-4faa-9274-7b809594e1e8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 23 Feb 2019 11:42:59 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="0c747c25aa608d07767d5952ea4abe22"; logging-data="28697"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18htRl0zjHvFCDBe803nEVc6HSyraqeZG0=" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Cancel-Lock: sha1:Lk/+Va+IzH3SrXv69Xu4QgV3b7s= In-Reply-To: Content-Language: en-GB Xref: csiph.com comp.graphics.apps.gnuplot:4161 On 23/02/2019 06:04, Ethan Merritt wrote: > On Fri, 22 Feb 2019 21:34:37 -0800, Savin Beniwal wrote: > >> On Friday, 22 February 2019 21:08:08 UTC+5:30, Chris Elvidge wrote: >>> Hi all. >>> >>> Does anyone know how to get a degree sign (°) on svg enhanced terminal, >>> output file.svg > > SVG is natively in UTF-8 encoding. > You should set gnuplot to match. > (Actually you should set gnuplot to use UTF8 always unless there > is some special reason not to). > > gnuplot> set encoding utf8 > gnuplot> show decimal > decimalsign for input is . > decimalsign for output has default value (normally '.') > degree sign for output is ° > > >> Dear Chris!!! >> Have you tried with {/Symbol \260} ? I think it works well. >> Savin > > No, sorry. That won't work. > Symbol \260 assumes the encoding is Adobe Special Symbol, > which is basically only preferred for PostScript output. > I don't think you can get SVG to use that encoding. > > > cheers > > Ethan > Thanks Ethan. I (now) have: (I thought that Verdana might be causing a problem, so I put in the full path; and I've changed the definition of dg to dg=" `/usr/bin/printf "\u00B0"`C") gnuplot> load 'gpts/gnuplot_temp_24.gpt' gnuplot> show term terminal type is svg size 1100,500 dynamic enhanced font '/usr/share/fonts/microsoft/verdana,12' butt dashlength 1.0 gnuplot> show encoding nominal character encoding is utf8 however LC_CTYPE in current locale is en_GB.UTF-8 gnuplot> show decimal decimalsign for input is . decimalsign for output has default value (normally '.') degree sign for output is ° gnuplot> print nt 74.7 ଀C gnuplot> print NT 74.65 gnuplot> nt=sprintf("%.1f",NT)." `/usr/bin/printf "\u00B0"`C" gnuplot> print nt 74.7 °C So the degree sign somehow disappears during plotting. On the plot that small square thing is there, too. At least now I get something instead of nothing. Is this a good thing? But, how do I get the degree sign to stick? Or how do I set it in a format string? Or how do I print it? Thanks Cheers -- Chris Elvidge, England