Active Topics

 



Notices


Reply
Thread Tools
thp's Avatar
Posts: 1,389 | Thanked: 4,248 times | Joined on Sep 2007 @ Vienna, Austria
#71
Originally Posted by peterleinchen View Post
Furthermore I would like him to ask to update his solution in following way:

...

This should do the trick!?
Yes, indeed I haven't thought about the sending Emoji SMS path. hedayat's fix (replacing all occurences of UCS-2 with UTF16) probably fixed that as a side effect, so to fix that in my solution, there needs to be a code updated as suggested by peterleinchen:

https://github.com/thp/emojifix/comm...d6306343645f39

I'll try to update the binaries (updated libxconv library) soon.

If anybody feels motivated, one could update the patcher to find the string table in the ELF file and replace "UCS-2" with "UTF16" (hedayat's solution):

https://github.com/thp/emojifix/blob.../src/patcher.c

Of course, the easier way in that case would just be using
Code:
sed -e 's/UCS-2/UTF16/g'
on the .so

Last edited by thp; 2015-07-09 at 22:25. Reason: UCS-2 -> UTF16 (removed dash)
 

The Following 6 Users Say Thank You to thp For This Useful Post:
thp's Avatar
Posts: 1,389 | Thanked: 4,248 times | Joined on Sep 2007 @ Vienna, Austria
#72
New binary build now available here:

http://thp.io/2014/emojifix/emojifix...5-07-09.tar.gz

To reproduce this build from source, just build it in the Harmattan SDK:

Code:
git clone git://github.com/thp/emojifix.git
cd emojifix
scp n9:/usr/lib/libsms-utils.so.0.0.0 \
  original/libsms-utils.so.0.0.0.harmattan
make
 

The Following 5 Users Say Thank You to thp For This Useful Post:
Posts: 163 | Thanked: 619 times | Joined on Oct 2012
#73
Just one question: I was going to use 'sed', but I was unsure if it'll work on binary files (specially since it is line based). Is using sed safe? If it is, that'll be great.
__________________
My N9 apps: MeeTeleGram, Dukto, Prayers, Saaghar, N9 Easy Boot
Donations are appreciated
 

The Following User Says Thank You to hedayat For This Useful Post:
peterleinchen's Avatar
Posts: 3,320 | Thanked: 6,206 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#74
Hooray,
just sent a SMS with an iPhone emoticon -that did not work before- from N900 to N9 (and vice versa with some added harmoji 0.6.6)!

Thanks thp (and hedayat).

--edit
just one (maybe) negative thing now:
the char counter is f*#cked up
on N900 it goes immediately from 160 to 67 after inserting an emoticon (which is pretty normal)
and/but also jumps from 160 to 68 on inserting a normal character
--edit
and goes back to 158 after inserting second ASCII character. So, as I assume, no one will send a one-char SMS all good on N900

on N9 the counter goes to zero on inserting an emoticon

no idea whether those counters are reliable now (possibly using utf16 'eats' resources, 92 chars????)
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature

Last edited by peterleinchen; 2015-07-10 at 20:22. Reason: added correction for N900 char counter
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
peterleinchen's Avatar
Posts: 3,320 | Thanked: 6,206 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#75
Originally Posted by hedayat View Post
Just one question: I was going to use 'sed', but I was unsure if it'll work on binary files (specially since it is line based). Is using sed safe? If it is, that'll be great.
using sed on binary should also work (content is one big line?)
but I am not sure if thp's command
sed -e 's/UCS-2/UTF-16/g'
will work. Exchanging (hex editing) a binary and changing lengths is dangerous. Possibly he meant
sed -e 's/UCS-2/UTF16/g'
But just go ahead and try 😜
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
thp's Avatar
Posts: 1,389 | Thanked: 4,248 times | Joined on Sep 2007 @ Vienna, Austria
#76
Originally Posted by peterleinchen View Post
using sed on binary should also work (content is one big line?) [...] but I am not sure if thp's command [...] will work. Exchanging (hex editing) a binary and changing lengths is dangerous.
Using sed on a binary will work; and yes, shouldn't change the string size then, as all offsets after it would become invalid; updated my post accordingly.
 

The Following 3 Users Say Thank You to thp For This Useful Post:
Posts: 163 | Thanked: 619 times | Joined on Oct 2012
#77
Originally Posted by peterleinchen View Post
--edit
just one (maybe) negative thing now:
the char counter is f*#cked up
on N900 it goes immediately from 160 to 67 after inserting an emoticon, and/but also jumps from 160 to 68 on inserting a normal character
on N9 the counter goes to zero on inserting an emoticon

no idea whether those counters are reliable now (possibly using utf16 'eats' resources, 92 chars????)
Jumping from 160 to 67 is normal when you type non-ASCII (e.g. Persian) SMSes (not related to Emoji's), so that's correct. But it should not happen if you write ASCII SMSes; and the counter should jump back to x/160 state rather than x/67.
__________________
My N9 apps: MeeTeleGram, Dukto, Prayers, Saaghar, N9 Easy Boot
Donations are appreciated
 

The Following 2 Users Say Thank You to hedayat For This Useful Post:
thp's Avatar
Posts: 1,389 | Thanked: 4,248 times | Joined on Sep 2007 @ Vienna, Austria
#78
Not sure if there's anything additional to SMS encoding (each part in a multi-SMS gets less space than a single non-multi-SMS), but in general for UCS-2 vs UTF-16:

UCS-2 can only encode codepoints between 0 and 2^16 (that's the reason why some Emoji characters outside of this range don't work). Each character takes up 16 bits (2 bytes). UCS-2 is defined as big endian, so usually no byte order mark is necessary(?).

UTF-16 can encode all unicode codepoints, using either 16 bits (2 bytes) if it fits, or 32 bits (4 bytes) otherwise. UTF-16 can be big endian and little endian, so a byte order mark might be necessary (not sure if the endianness is defined for SMS and UTF-16/UCS-2).

The README file contains some links to SMS encoding webpages related to UTF-16/UCS-2.
 

The Following 3 Users Say Thank You to thp For This Useful Post:
Posts: 1,095 | Thanked: 1,658 times | Joined on Jan 2011 @ Touring
#79
Will this fix go to CSSU testing?
 
peterleinchen's Avatar
Posts: 3,320 | Thanked: 6,206 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#80
Originally Posted by biketool View Post
Will this fix go to CSSU testing?
Unfortunately MeeGo/Harmattan has no CSSU!

But definitely worth to be integrated into Maemo/N900 CSSU.
As it is fix for Nokia blob, it probably will end up as patcher utility deb. But this will be decision of maintainer.
We (you?) should contact CSSU maintainer...
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:33.