Hello,
I have a little problem with the shapes that has a text containing a carriage return or a new line(\r,\n…).
every time that I use the method shape.getText().getValue().getText() I’m getting a String with an unknown character.
"Stop all?investigation?fffffff?dddddddd"
I did put an attachment file containing an example.
Hi Achraf,
Thank you for contacting support. We managed to replicate the said problem on our side. We’ve logged an investigation under ticket id DIAGRAMJAVA-50332 in our bug tracking system. Your post has also been linked to this ticket. We’ll keep you informed regarding any available updates. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.
Hi Achraf,
Thank you for being patient. The Eclipse console window does not handle a carriage return character, since this character could not be shown on screen. The character “?” means char 8232, you could get this char using:
shape.getText().getValue().getText().charAt(44);
PS: we have closed this issue as “Won’t Fix”.
Hi Imrane,
Don’t worry about this problem.I did found a Solution for it.
I’m putting here the solution just in case of someone has the same problem.
It’s simple, you can just replace all the non printable characters with the code below :
shape.getText().getValue().getText().replaceAll("\P{Print}", " ");
Hi Achraf,
Thank you for the provided solution. It is nice to hear from you that the problem has been resolved. Please let us know in case of any further assistance or questions.