Skip to main content
Participant
April 15, 2013
Question

PMString constructor fails in CS6 if right quote present

  • April 15, 2013
  • 2 replies
  • 1921 views

The following code works in CS4 but fails in CS6 in Adobe Owl. The right quote (\u2019) appears to be causing an issue in its 8 bit representation (0x92).

WideString w(L"Paul\2019s issue");

PMString sorig = w;

PMString x = sorig.GetPlatformString().c_str();//Failure - GetPlatformString() turns 2019 into 0x92 in the generated std::string - PMString constructor appears to choke on the 0x92

Is this a bug or has the behaviour of the PMString constructor been redefined?

This topic has been closed for replies.

2 replies

Inspiring
April 16, 2013

Hi FirstRoss,

Try this:

WideString w(L"Paul\2019s issue");

PMString sorig = PMString(w);

PMString x = PMString(sorig.GetPlatformString().c_str());

Regards,

Oleg

FirstRossAuthor
Participant
April 16, 2013

Hi Oleg,

Thanks for the tip. I know that SetXString can also be used to get around the issue. Since your solution differs from that there may be several ways to get around the problem. However, I am faced with a few thousand cases of the issue and since it compiles AND it used to work in CS4 I'd like to understand why I am suddenly faced with all the work involved to find and fix potential issues of this kind. I also wonder if this is specific to the right quote character or is manifested for other characters which can come in both a 16 bit and 8 bit form.

Best Wishes,

FirstRoss

John Hawkinson
Inspiring
April 15, 2013

I've moved your post to the InDesign SDK forum. The general forum doesn't really do very well with C++ queries.