Encoding problem

Hi All,

Hope you can help me with the below :).

I'm working on a script on SUN solaris and I'm facing a problem with the number encoding as shown below,

1 is encoded to 31 (this is ASCII so it's ok)
11 is encoded as B118 !!! don't know why
111 is encoded as B1580C !!! don't know why
22 is encoded as 3219

The chars are encoded to normal ASCII format. Does any one know what kind of encoding is this?

Thank you all,
Ammar

Excuse me for asking (my crystal ball has a nasty crack and is off for repair), but where are you entering those numbers, and where do you see that encoding?

:-), It's SMS CDR (Call detail record). It is saved by the SMSC, But as I mentioned, the other chars are ok, It got this weired encoding only when there is more than one number.
For example: if you have this 1a1, you'll have 316131, but when you have it like this 11a it will be like this: B11861.

Thanks,

The switch vendor could have implemented any kind of encoding they wanted, I think the best way to know is to refer the CDR description provided by the vendor. Also provide more data, if you want us to look and try.

Thanks, Unfortunately I have no records description :(.
I will do more test and will provide more data to see if we can recognize it.

Thanks,

---------- Post updated at 05:27 AM ---------- Previous update was at 02:54 AM ----------

Hi Again,
I made a mistake, the weired encoding is happening only with English(chars & numbers) it's working normally only with Unicode chars, sorry about that, I made a few test as shown below,

text I sent --> System encoded text:
2-->32
22-->3219
222-->32990C
2222-->32994C06
A2A2-->41595006
A22-->41990C
AAA-->c16010
A-->41