Inch character in str file

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 15:56, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   12+ 
Platform:      
Language(s) :     C++  ;   PYTHON  ;

---------
In my .str file I have several entries with names for
different cameras film properties.
Some names by tradition use the " sign. (Inch)
I.e. one film format is called: 1/1.8"

However I'm not able to get it correct in my .str file such as:

SDOF_FILM_17 "1/1.8",""";

Any idea if this is possible to do in the .str file?
(It's the res/string_us/description/my.str I'm talking about)

Cheers
Lennart

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 17:25, xxxxxxxx wrote:

You might need to include the Unicode representation in the .str file but escape sequences should work.

"1/1.8","""  is two strings.  I don't think you can do that.  I have never seen multiple strings associated with a single string resource description using a comma separator.  You should try it like this:

"1/1.8""

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 17:44, xxxxxxxx wrote:

Thanks Robert for checking. Didn't work thou, it
then reports an error for the next line.

Afaik "1/1.8"""; should work (no comma as I had before)
the little research I've done so far.

But the .str file itself is maybe not C++ ?
I'm using it in a Python plug but thought the descriptions are C++ ?

Cheers
Lennart

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 19:21, xxxxxxxx wrote:

" 1/1.8 " "" won't work since you've already closed the quoted string (bolded)

The .str file is just a file used by C4D.  It is not C++.
You will need the Unicode representation instead.  The escape character is still used but uses the numerical reference instead (copyright symbol, for instance) :

\u00a9

\u represents a Unicode sequence and the 4 digits are the value in hexadecimal.  \u0022 is the double quote.  So, you might need to represent the string resource like this:

SDOF_FILM_17 "1/1.8\u0022";

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 19:28, xxxxxxxx wrote:

This is a trick.
But it appears that the way that C4D displays characters in it's GUI's. You can create the "illusion" of a double quote by using two single quotes next to each other like this:

SDOF_FILM_17 "1/1.8 '' ";

The forum here doesn't seem to display single quotes differently either.
So here's the same line of code written phonetically:
SDOF_FILM_17   (DoubleQuotes)1/1.8(singleQuote)(singleQuote)(DoubleQuote).

I tried this in both a C++ and a Python tag plugin. And they both work fine under a Windows environment. And the next entries in the .str file also work properly.
But since you're on a Mac. I don't know if this trick will work for you.

-ScottA

*Oops- Cross posted with Robert

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 19:30, xxxxxxxx wrote:

Thanks Robert! Works a treat!
Was hunting Unicode on Wiki and didn't get it, now I do thanks to your snippet.
Earlier example was also a typo. it should be: "1.8"";
That actually works within Cinema itself, like userdata strings.
(Even thou the ending ; (the semicolon) is "blue" in coffee script.

Cheers
Lennart

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/08/2011 at 19:32, xxxxxxxx wrote:

Oh, missed your post Scott, thanks for your input as well :)

Cheers
Lennart