Page 1 of 1
Polish Characters Encoding
Posted: Wed Jan 09, 2013 11:42 am
by stevep
Hi,
What is the best encoding method to send Polish characters to the handset. From research ISO88592 is the character set which contains the extended characters. I have tested with different encodings and I cannot see the character ó in my messages.
Steve
Re: Polish Characters Encoding
Posted: Wed Jan 09, 2013 12:30 pm
by alt
Hi stevep,
It depends on how SMSC processes SMPP text.
GSM 03.38 has only character ò (0x08). I don't see ó there.
For russian we sometimes use data_codings 0x4.
In worst case you need to use UCS2 data coding.
Re: Polish Characters Encoding
Posted: Wed Jan 09, 2013 2:06 pm
by stevep
Thank you for the reply.. I had a response from my carrier..
"ó is part of latin 1 (should be F3 in the table). So in theory you should be able to send it if you set data coding to 0x03"
I have tried Latin1 without success, is there some mapping to do?
Steve
Re: Polish Characters Encoding
Posted: Wed Jan 09, 2013 2:41 pm
by alt
Please try code below
Code: Select all
client.MapEncoding(DataCodings.Latin1, Encoding.GetEncoding("iso-8859-2"));
Re: Polish Characters Encoding
Posted: Fri Jan 11, 2013 5:29 am
by stevep
Thank you, I will try that.
Does that use 8bits for all characters or just the ones in 8859-2?
Just want to be sure not to go over 140 bytes.
Steve
Re: Polish Characters Encoding
Posted: Tue Jan 15, 2013 1:31 pm
by alt
with this mapping client will send bytes array of the text encoded in 8859-2 when data_coding Latin1 is specified.
Re: Polish Characters Encoding
Posted: Mon Mar 04, 2013 4:05 pm
by stevep
Hi Alt,
Does the enclosed look valid as it appears I am not able to send Polish characters. data is the
if (smsMessage.Body.DataCoding == DataCoding.et7bitText)
{
data.DataCoding = DataCodings.Default;
_smpp.MapEncoding(DataCodings.Default, new Inetlab.SMPP.Encodings.GSMEncoding());
}
else if (smsMessage.Body.DataCoding == DataCoding.etUCS2Text)
{
data.DataCoding = DataCodings.UCS2;
_smpp.MapEncoding(DataCodings.UCS2, System.Text.Encoding.BigEndianUnicode);
}
else if (smsMessage.Body.DataCoding == DataCoding.etISO88591)
{
data.DataCoding = DataCodings.Latin1;
_smpp.MapEncoding(DataCodings.Latin1, Encoding.GetEncoding("iso-8859-1"));
}
else if (smsMessage.Body.DataCoding == DataCoding.etISO88592)
{
data.DataCoding = DataCodings.Latin1;
_smpp.MapEncoding(DataCodings.Latin1, Encoding.GetEncoding("iso-8859-2"));
}
byte[] text_bytes = _smpp.GetMessageBytes(smsMessage.Body.Text.Value, data.DataCoding);
data.ShortMessageBytes = text_bytes;
Steve
Re: Polish Characters Encoding
Posted: Tue Mar 05, 2013 4:06 pm
by stevep
I ask as with the settings above for ISO88592 I am still not able to send Polish characters.
Steve
Re: Polish Characters Encoding
Posted: Tue Mar 05, 2013 4:44 pm
by alt
Hi Steve,
Does mobile phone support ISO88592?
Please ask SMSC again if they ever had success with Polish characters. Possible they convert text before sending to mobile phone.
With code above library should send 0xF3 for ó symbol in Latin1. We can make sure if you send me trace file.
Re: Polish Characters Encoding
Posted: Thu Jan 30, 2014 10:37 am
by alex111
i use it its problematic...........
leather 4 sure