View Single Post
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#60
So I added an option to pass a txt file to the conversation. No problems with character encoding.
Now I can send every character which I can write with ukeyboard through the conversation. So far tested it only with "-c" and "-C". Works only with "-c". service.compose switch itself to UCS2 sms and service.send does it not.
Is there a way to set maybe the codec to "ISO-10646-UCS-2" before sending?

Here is nearly all what I did. Only added a new param and using it instead "-m". Maybe it is helpful for somebody.

Code:
case SmsSender::argFile:
		{
			QByteArray fullmess;
                    	m_TxtFile = new QFile(param);
			if (!m_TxtFile->open(QIODevice::ReadOnly | QIODevice::Text))
				return errLogfileOpenFailed;
			
			while (!m_TxtFile->atEnd()) {			
			fullmess = m_TxtFile->readLine();
			message.append(fullmess);
			}
			m_TxtFile->close();
		}                 
		   break;
 

The Following 2 Users Say Thank You to Halftux For This Useful Post: