I am working on US Drivers License string. I get that string from manatee scanning sdk
The license string starts with format @\n\x001E\rANSI 63601...
while encoding it to json (json encoding is done internally by spring framework) the special character \x001E
gets stripped resulting in string something like this @\n\rANSI 63601
I tried to ASCII encode license string first by doing:
LicenseString = new String(LicenseString.getBytes(), "ASCII");
this does preserves \x001E
but strips \n \r
chars
resulting in string something like this @\x001eANSI 630601...
Can somebody guide me what am i doing wrong?
P.S: double escaping special chars etc is not an option for me here.
EDIT
I am working in Android Studio and i am storing the string @\n\x001E\rANSI 63601...
in a Java String
object