Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

unicode value for line break , space

New Here ,
Sep 17, 2008 Sep 17, 2008
Hello All ,
I am converting 1 byte string array to two byte unicode string.
Can you please tell me how to replce space and newline character
I am doing following with input sting
here
char *inText1 ,OutText;
int k =0;
//intext now has some string eg 18e118e22018e318e40d18e5e60d
for(int i = 0; i< strlen(inText);i++)
{
if((inText1 == 0x20) ||(inText1 == 0x0D)|| (inText1 == 0x0A) ||(inText1 == 0x85)||(inText1 == 0x0C))
{
outText = ox00;
k++;
outText = inText1;
k++
}//end if
else
{
....
}

}//end for
after this I am converting this OutText to wchar_t * and then WideString and then using replacecmd am replcaing the textmodel data.

Using above code new line is not maintained in the outText.
eg.
adobe
indesign
cs3
=>
adobe indesign cs3

Please help me to solve this problem.

Thanks & Regards,
Pallavi.
TOPICS
SDK
502
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 30, 2008 Sep 30, 2008
Hi,<br />It seems you have source as C string.<br /><br />declare PMString lsStr1<br />Use 'Append' to append all character to this lsStr1.<br /><br /> K2::shared_ptr<WideString> string(new WideString(lsStr1));<br /> InterfacePtr<ICommand> insertCmd (textModelCmds->InsertCmd(tpos, string));<br />This will create the widestring you need for inserting in text.<br /><br />These functions will handle all the low level conversions to two byte characters.<br /><br />Rajani
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 10, 2008 Oct 10, 2008
LATEST
Hello ,
Thanks for reply.
I am doing the same steps as above.But still have problems for ' ' , '\n','\t' characters.
What is the 2 byte value for the above characters in adobe indesign cs2 application.

Pallavi.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines