Groups > Application developers > Photoshop SDK > Re: Unicode and action control




Unicode and action control

Unicode and action control
Mon, 7 Apr 2008 11:24:05 -0700
Hi,

I'm trying to set the selected profile in the print options section of the
Photoshop print dialog. When i try and do this with the profile name using only
ascii characters, it works fine, as soon as i put anything else in there, i does
not work. Here's the code ( just the important line ) i use:

sPSActionDescriptor->PutString(desc0xf8, keyName, (char*)uniData);

What type of stirng is this expecting if i want to pass unicode data and are
there any ps API's to create that string.

thanks

Post Reply
Re: Unicode and action control
Tue, 8 Apr 2008 09:13:34 -0700
I don't have an answer, but a general observation:

If you have an API expecting char * data which does not have a length
field, you can be pretty sure that it is expecting a null-terminated
string.

Clearly, a Unicode string (in the Windows or MacOS meaning of Unicode,
UCS-2), is not going to function as a substitute for this: it is
likely to have zero bytes long before the end.

Some char* routines would accept UTF-8 Unicode data, but you'd expect
the documentation to say so. You could try it, however.

Post Reply
about | contact