POV-Ray : Newsgroups : povray.windows : Output_File_Name -- quoted string question Server Time
27 Oct 2026 19:36:08 EDT (-0400)
  Output_File_Name -- quoted string question (Message 1 to 16 of 16)  
From: Kenneth
Subject: Output_File_Name -- quoted string question
Date: 12 May 2013 08:20:02
Message: <web.518f8756a19a1fd1c2d977c20@news.povray.org>
In Windows XP:

Could someone tell me what I'm doing wrong with the following quickres.ini code
that I'm using? It *works* OK (specifying a folder to put my rendered image in)
but I get an annoying non-fatal error message at the end of a render, "Most
likely detected an unquoted string with spaces in INI file..."  (Same behavior
in 3.62 and 3.7RC7) Sorry if the code doesn't fit on one line:

Output_File_Name=c:\Documents and Settings\Owner\My
Documents\POV-Ray\v3.6\tests\

I can see that there are "unquoted strings with spaces" (I think!), and I've
tried all sorts of quotes and slashes as a remedy; but they all cause one
problem or another. I've been living with this for years (and ignoring it); but
it's high time I fixed the problem.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 10:07:38
Message: <518fa22a$1@news.povray.org>
On 12-5-2013 14:16, Kenneth wrote:
In my own povray.ini file, I write these things between quotes:

Output_File_Name = "c:\Documents and Settings\Owner\My 
Documents\POV-Ray\v3.6\tests\"


Thomas


Post a reply to this message

From: Stephen
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 10:33:46
Message: <518fa84a$1@news.povray.org>
On 12/05/2013 1:16 PM, Kenneth wrote:
> Output_File_Name=c:\Documents and Settings\Owner\My
> Documents\POV-Ray\v3.6\tests\

Try

Output_File_Name="c:\\Documents and Settings\\Owner\\My 
Documents\\POV-Ray\\v3.6\\tests\\"


This works for me.
Not that I use this method, myself. :-)

-- 
Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 10:36:07
Message: <518fa8d7@news.povray.org>
On 12/05/2013 3:33 PM, Stephen wrote:
>
> Try
>
> Output_File_Name="c:\\Documents and Settings\\Owner\\My
> Documents\\POV-Ray\\v3.6\\tests\\"
>
>
> This works for me.
> Not that I use this method, myself. :-)

It also works with "\" instead of "\\" as Thomas posted.

-- 
Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 10:55:56
Message: <518fad7c@news.povray.org>
On 12-5-2013 16:36, Stephen wrote:
> It also works with "\" instead of "\\" as Thomas posted.
>

In some cases double back slashes are needed instead of single ones, I 
found out by experience. In particular, when declaring names to be used 
later in the code, like:

#declare Terragen_Sky_Name = "Terragen files\\Skies\\Pano_09_0h_50a_"

Not sure why that is though.

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 11:24:27
Message: <518fb42b@news.povray.org>
On 12/05/2013 3:55 PM, Thomas de Groot wrote:
>
> In some cases double back slashes are needed instead of single ones, I
> found out by experience. In particular, when declaring names to be used
> later in the code, like:
>
> #declare Terragen_Sky_Name = "Terragen files\\Skies\\Pano_09_0h_50a_"
>
> Not sure why that is though.

"#include" paths need double slashes.
It must be different modules parsing the ini files and the pov files.
I would think.

-- 
Regards
     Stephen


Post a reply to this message

From: Kenneth
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 12:30:03
Message: <web.518fc21df34be07c2d977c20@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 12-5-2013 14:16, Kenneth wrote:
> In my own povray.ini file, I write these things between quotes:
>
> Output_File_Name = "c:\Documents and Settings\Owner\My
> Documents\POV-Ray\v3.6\tests\"
>

Hey, this works!

I'm embarrassed to say that I tried this earlier...but I didn't run
an actual render to see what would happen!!  :-/  The reason being, that all of
the text in my quickres file that *followed* this line then took on the
appearance of being in string notation--like one *long* string, all the way to
the end of the file. (Rather hard to describe.) So I didn't pursue it, thinking
I had made a mistake.

That behavior is rather odd, to say the least--although it doesn't affect the
operation of the code.

Thanks!


Post a reply to this message

From: Kenneth
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 12:55:01
Message: <web.518fc73cf34be07c2d977c20@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

>
> Try
>
> Output_File_Name="c:\\Documents and Settings\\Owner\\My
> Documents\\POV-Ray\\v3.6\\tests\\"

This actually works even better; the double slashes eliminate the 'unending
string' behavior that the single slashes produce. Using this particular syntax
never occurred to me, though; the docs don't mention it.

But your suggestion gave me an idea: I'm guessing that the most 'important'
slash is the final one, preceding the last double-quote. My goofy intuition,
anyway, based on something I read in the docs. So I tried it a third way--
single slashes *except* at the end-- and it works as well as using all double
slashes:

Output_File_Name="c:\Documents and Settings\Owner\My
Documents\POV-Ray\v3.6\tests\\"

No error message, and no 'unending strings.'  Great!

Many thanks, to you and to Thomas. Mystery solved!


Post a reply to this message

From: Stephen
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 13:53:33
Message: <518fd71d$1@news.povray.org>
On 12/05/2013 5:51 PM, Kenneth wrote:
> Output_File_Name="c:\Documents and Settings\Owner\My
> Documents\POV-Ray\v3.6\tests\\"
>
> No error message, and no 'unending strings.'  Great!
>

IIRC it is the spaces in the directory names that cause the trouble. 
There is or was, in a previous version, documented. But not under the 
INI settings.

> Many thanks, to you and to Thomas. Mystery solved!

I am sure that I can speak for Thomas when I say, that it is our 
pleasure to help.

-- 
Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 20:50:45
Message: <519038e5$1@news.povray.org>
Le 13-05-12 10:55, Thomas de Groot a écrit :
> On 12-5-2013 16:36, Stephen wrote:
>> It also works with "\" instead of "\\" as Thomas posted.
>>
>
> In some cases double back slashes are needed instead of single ones, I
> found out by experience. In particular, when declaring names to be used
> later in the code, like:
>
> #declare Terragen_Sky_Name = "Terragen files\\Skies\\Pano_09_0h_50a_"
>
> Not sure why that is though.
>
> Thomas
>

The back slash is the escape character in strings. For example, "\n" is 
used as a new line character, if you have \Skies\Pano,
it get parsed as "\s" "kies" "\p" "ano"
\s stand for the control character DC3 and \p for DLE


Alain


Post a reply to this message

From: Kenneth
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 21:50:01
Message: <web.519045c3f34be07c2d977c20@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Stephen <mca### [at] aolcom> wrote:
>
> >
> > Try
> >
> > Output_File_Name="c:\\Documents and Settings\\Owner\\My
> > Documents\\POV-Ray\\v3.6\\tests\\"
>
> This actually works even better; the double slashes eliminate the 'unending
> string' behavior that the single slashes produce. Using this particular syntax
> never occurred to me, though; the docs don't mention it.
>

Hmm, I see now that the docs do mention something very similar to this (in the
'String Literals' section), but in a different context; it wasn't enough of a
clue for me to expand on it successfully, though.

Strings are mighty strange creatures, IMO, and I'm always learning something new
about their use.

While I was trying to solve my problem, I tried this version of the code as well
(based solely on a sentence in the docs, "if you need to specify a quote mark in
a string literal you must precede it with a backslash")--I just naively added a
slash-and-double-quote at the beginning and end...

\"c:\Documents and Settings\Owner\My Documents\POV-Ray\v3.6\tests\\"

With this version, the 'unending string' appearance cropped up again; but I
proceeded with the render anyway. It did eliminate the original error message--
but the rendered image ended up in the top level of the c: directory!
                 c:\my_image.png

I suppose there's a method to this madness, but it sure is hard to comprehend.
Like a 'black art.' :-O


Post a reply to this message

From: Kenneth
Subject: Re: Output_File_Name -- quoted string question
Date: 12 May 2013 22:20:01
Message: <web.51904c3af34be07c2d977c20@news.povray.org>
BTW, the thing that prompted me to try and solve my original problem was a
subtle difference in behavior between v3.62 and 3.7RC7. In 3.62, the "unquoted
string" error message was benign--just showing up in the message stream, if I
cared to look for it. In 3.7, though, POV-Ray actively switches attention from
the scene file to the quickres.ini file, pointing out the location of the error.

I'm not sure which method of behavior I like better. I suppose 3.7 is doing the
'right thing' by drawing attention to the error; but it can't be so easily
ignored this way, if I *wanted* to ignore it.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Output_File_Name -- quoted string question
Date: 13 May 2013 03:14:36
Message: <519092dc$1@news.povray.org>
On 13-5-2013 2:50, Alain wrote:
> The back slash is the escape character in strings. For example, "\n" is
> used as a new line character, if you have \Skies\Pano,
> it get parsed as "\s" "kies" "\p" "ano"
> \s stand for the control character DC3 and \p for DLE
>

Ah yes, of course. Forgot about the rationale of character strings, 
while using them all the time ;-)

Thomas


Post a reply to this message

From: clipka
Subject: Re: Output_File_Name -- quoted string question
Date: 13 May 2013 14:03:23
Message: <51912aeb$1@news.povray.org>
Am 12.05.2013 18:26, schrieb Kenneth:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> On 12-5-2013 14:16, Kenneth wrote:
>> In my own povray.ini file, I write these things between quotes:
>>
>> Output_File_Name = "c:\Documents and Settings\Owner\My
>> Documents\POV-Ray\v3.6\tests\"
>>
>
> Hey, this works!
>
> I'm embarrassed to say that I tried this earlier...but I didn't run
> an actual render to see what would happen!!  :-/  The reason being, that all of
> the text in my quickres file that *followed* this line then took on the
> appearance of being in string notation--like one *long* string, all the way to
> the end of the file. (Rather hard to describe.) So I didn't pursue it, thinking
> I had made a mistake.
>
> That behavior is rather odd, to say the least--although it doesn't affect the
> operation of the code.

The reason is the trailing backslash: In POV-Ray's scene description 
language (and many other languages), the backslash serves as an "escape 
character" that changes the meaning of the following character(s); if it 
precedes a double quote, this double quote is taken as part of the 
string rather than the end of it.

This is not the case in INI files, because it would make specifying 
Windows path names a pain.

Or, actually, it would have done so in the past. Nowadays, Windows - and 
most Windows programs, including POV-Ray - also accept Unix-style 
forward slashes in path names. So the following should work perfectly 
fine without messing up the way the rest of the file is shown:

Output_File_Name = "c:/Documents and Settings/Owner/My 
Documents/POV-Ray/v3.6/tests/"

You can also mix both styles.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Output_File_Name -- quoted string question
Date: 14 May 2013 02:48:22
Message: <5191de36$1@news.povray.org>
On 13-5-2013 20:03, clipka wrote:

> Or, actually, it would have done so in the past. Nowadays, Windows - and
> most Windows programs, including POV-Ray - also accept Unix-style
> forward slashes in path names. So the following should work perfectly
> fine without messing up the way the rest of the file is shown:
>
> Output_File_Name = "c:/Documents and Settings/Owner/My
> Documents/POV-Ray/v3.6/tests/"
>
> You can also mix both styles.
>

Good to know. One is never too old to learn new tricks ;-)

Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Output_File_Name -- quoted string question
Date: 14 May 2013 08:20:01
Message: <web.51922a87f34be07c2d977c20@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 12.05.2013 18:26, schrieb Kenneth:

>
> ...Nowadays, Windows - and
> most Windows programs, including POV-Ray - also accept Unix-style
> forward slashes in path names. So the following should work perfectly
> fine without messing up the way the rest of the file is shown:
>
> Output_File_Name = "c:/Documents and Settings/Owner/My
> Documents/POV-Ray/v3.6/tests/"
>

Hmm. My results with this in Windows XP are interesting and weird: It *does*
eliminate the 'unending string quote' appearance in the INI file; but it
produces a fatal error, "File Init Error: Cannot open output file."

(I double-checked to see if I had made any errors with my syntax.)

Perhaps it works with *later* Windows editions(?)


Post a reply to this message

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