POV-Ray : Newsgroups : povray.newusers : Degree symbol Server Time
4 May 2024 10:55:39 EDT (-0400)
  Degree symbol (Message 1 to 6 of 6)  
From: kurtz le pirate
Subject: Degree symbol
Date: 14 Sep 2023 08:51:18
Message: <650301c6$1@news.povray.org>
Hello,

Cannot use degrees "°" symbol in POV. In UTF8, the code is 176/0xB0.

In global_settings, I've added the option "charset utf8".

I defined: #declare DEGREE_SIGN = chr(176);

Both in the console (#debug") and in a :
#declare DEStr = concat(str(DECDeg,-2,0), DEGREE_SIGN,
str(DECMinute,-2,3),"'")
#write (OUTFILE, concat(DateStr,"\t", RAStr,"\t", DEStr,"\n") )


The sign never appears...
Any help ?



-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: jr
Subject: Re: Degree symbol
Date: 14 Sep 2023 09:35:00
Message: <web.65030b2b28ce9bb4b180e2cc6cde94f1@news.povray.org>
hi,

kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>

> ...
> The sign never appears...
> Any help ?

no help (sorry), just confirmation that the same is true for beta.2 (without
graphical i/f, self-compiled, on a Linux box), I can render the char to appear
in an image[*], but cannot get it to file or console.

[*] interestingly, 'povray' shows a different gylph (infinity, number 8
rotated), while WFP's 'povr' displays the degree symbol.


regards, jr.


Post a reply to this message

From: jr
Subject: Re: Degree symbol
Date: 14 Sep 2023 10:40:00
Message: <web.65031a7d28ce9bb4b180e2cc6cde94f1@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> ...I can render the char to appear
> in an image[*], but cannot get it to file or console.

and, fwiw, reading a string with the utf8 char in it from file gives me:
"Possible Parse Error: Non-ASCII character has been replaced by space character"


regards, jr.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Degree symbol
Date: 14 Sep 2023 11:23:55
Message: <6503258b$1@news.povray.org>
On 14/09/2023 15:31, jr wrote:

> no help (sorry), just confirmation that the same is true for beta.2 (without
> graphical i/f, self-compiled, on a Linux box), I can render the char to appear
> in an image[*], but cannot get it to file or console.



I feel less alone


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Thorsten
Subject: Re: Degree symbol
Date: 14 Sep 2023 14:32:35
Message: <650351c3$1@news.povray.org>
On 14.09.2023 14:51, kurtz le pirate wrote:
> Hello,
> 
> Cannot use degrees "°" symbol in POV. In UTF8, the code is 176/0xB0.
> 
> In global_settings, I've added the option "charset utf8".
> 
> I defined: #declare DEGREE_SIGN = chr(176);
> 
> Both in the console (#debug") and in a :
> #declare DEStr = concat(str(DECDeg,-2,0), DEGREE_SIGN,
> str(DECMinute,-2,3),"'")
> #write (OUTFILE, concat(DateStr,"\t", RAStr,"\t", DEStr,"\n") )
> 
> 
> The sign never appears...
> Any help ?

The charset only affects the rendering of text. Console output is ASCII.

Thorsten


Post a reply to this message

From: Thorsten
Subject: Re: Degree symbol
Date: 14 Sep 2023 14:34:41
Message: <65035241$1@news.povray.org>
On 14.09.2023 15:31, jr wrote:
> hi,
> 
> kurtz le pirate <kur### [at] gmailcom> wrote:
>> Hello,
>>
>> Cannot use degrees "°" symbol in POV. In UTF8, the code is 176/0xB0.
>> ...
>> The sign never appears...
>> Any help ?
> 
> no help (sorry), just confirmation that the same is true for beta.2 (without
> graphical i/f, self-compiled, on a Linux box), I can render the char to appear
> in an image[*], but cannot get it to file or console.
> 
> [*] interestingly, 'povray' shows a different gylph (infinity, number 8
> rotated), while WFP's 'povr' displays the degree symbol.

The Unicode handling in POV-Ray for fonts is rather old and had to work 
with a lot of buggy fonts back in prehistoric times (read: 2007). Hence 
it on the one hand doesn't know all the font options and on the other 
hand the one it selects to find the character may be the wrong one or 
just broken or incomplete in that particular font.

Thorsten


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.