accented charaters bug?
Hi
(Illustrator 2015-3, mac)
I try to put this text in a frame.
&éèçà€ù~©®πRUNNING
Before insertAfter, the text ( as a char *) is correct
After the insertAfter, it is also correct ( via getContents).
But garbage is displayed as seen in the screen capture.
Dropbox - Capture d'écran 2018-04-25 05.39.42.png
I'm stuck.
Thanks for any help.
He re is some code I use.
// get contents
TextFrameRef textFrameRef = NULL;
AIErr result = sAITextFrame->GetATETextFrame(bloc, &textFrameRef);
ATE::ITextFrame textFrame(textFrameRef);
ATE::ITextRange textRange = textFrame.GetTextRange();
// textRange.Select();
//debug
int longueur = textRange.GetContents(s, 255);
// set contents to contenu
// Set the contents of the text range.
TextRangeRef range = NULL;
result = sAITextFrame->GetATETextRange(bloc, &range);
ATE:: crange(range);
crange.Remove();
crange.InsertAfter(ai::UnicodeString(contenu).as_ASUnicode().c_str());
// crange or textRange give the same result
//debug text is OK in s
longueur = textRange.GetContents(s, 255);
Best regards
Christian
-
christian commented
easy to reproduce with the snippetrunner and snptxt.InsertText procedure. Fails in cc2015 and cc2018.