Hi all -
I'm just about to wrap up my first iOS app that uses SQLite. I dunno why I hadn't used it for data storage in the past - it's great.
But I've got a small problem and would appreciate some advice.
My app requires the user to enter lots of data. While doing initial testing, I found that everything was working just as I had hoped. Then, I tested on the simulator and realized that users have the option to enter emoji. While that's all good and fine, the problem is that I don't know how (or even if i can) encode these special characters into my SQLite database.
One option would be to figure out how to do just that. I'd be grateful for any thoughts on that path.
Alternately, I would be just as happy if I were able to figure out a way to prevent users from entering emoji in the first place. I played around with setting different keyboard types, but every one that has regular alphanumerics also seems to also have the ability to shift over to emojis. Any thoughts on alternative methods of blocking these cute but pesky characters.
Thanks so much.
Joel
encoding (or avoiding) emoji
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 135
- Joined: Thu Sep 13, 2012 10:25 pm
Re: encoding (or avoiding) emoji
Okay, I'm making some progress. I've figured this much out:
that works great for my native fields.
Is there a way I can do something similar for the "ask" dialog box?
Thanks.
Joel
Code: Select all
on inputTextChanged
put "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz `1234567890-=[]\;',./~!@#$%^&*()_+{}|:<>?" & quote & return into tTest
if not (tTest contains the last character of mobileControlGet("iText", "text")) then
put mobileControlGet("iText", "text") into tText
delete the last character of tText
mobileControlSet "iText", "text", tText
end if
end inputTextChanged
Is there a way I can do something similar for the "ask" dialog box?
Thanks.
Joel
Re: encoding (or avoiding) emoji
Hi Joel,
For normal images I just base64encode them before shoving them in a DB. There is some sort of "b*" for binary files but I've never used it.
Not sure about emoji's.
Simon
For normal images I just base64encode them before shoving them in a DB. There is some sort of "b*" for binary files but I've never used it.
Not sure about emoji's.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!