• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help

 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,
been banging my head over this ,
would appreciate if anyone could help.

I have a string which is been encoded in base64 algorithm,
When I decode it I get something like this

String decoded = "PARTHIRU3 \u0000u\u0001_C \u0018\u0000C \u0018\u0000\u0000t�o\u0000u\u0001_\u0000\u0000\u0000\u000F\u0000\u0000\u0000\u000F\u0000\u0000\u0000\u000F\u0000\u0000\u0000\u000F\u0000t�o\u0000u\u0001_C\u0000t�o\u0000u\u0001_ \u0000t�o\u0000u\u0001_ C\u0000t�o\u0000u\u0001_\u0000\u0000\u0000\u000F\u0000\u0000\u0000\u000F\u0000\u0000\u0000\u000F\u0000\u0000\u0000\u000F\u0000u\u0001_\u0000\u0000\u0000\u000FSO\u0000t�o\u0000\u0000\u0000u\u0001_\u0018\u0000A01\u0000t�o\u0000u\u0001_\u0000u\u0001_D\u0000u\u0001_\u0000u\u0019�\u0000u\u0001_S\u0000t�o\u0000u\u0001_ \u0000t�o\u0000u\u0001_ \u0000t�o\u0000u\u0001_E\u0005\u0000u\u0001_\u0000t�o\u0000u\u0001_S\u0000u\u0001_ \u0018\u0000\u0018\u0000\u0000t�o\u0000u\u0001_\u0000\u0000\u0018\u0000\u0000u\u0001_\u0018\u0000\u0000t�o\u0000u\u0001_\u0018\u0000C\u0000\u0000\u0018\u0000\u0000\u0000\u0018\u0000 T\u0000u\u0001_";


As you can see this string has lot of escape literals all over the place,(a mix of null, trademark etc)

In midst of the whole thing I have to extract bits and pieces of data,

1, how do I remove all the escape from this string?

Sincerely appreciate your efforts

Best regards,
Parthi
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "remove" them? Do you want a much shorter string which doesn't include the nonprinting characters, or something else?
 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,
i just want to strip out the non printable char's.
once they are removed they go in to bean,
for example

"PARTHIRU3" a part of that string will be split in to "PARTHI","R", "U3" etc

parthi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic