Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obahareth/707a02d6fab49fa6e86c to your computer and use it in GitHub Desktop.
Save obahareth/707a02d6fab49fa6e86c to your computer and use it in GitHub Desktop.
/* Taken zigmob's (http://forums.macrumors.com/showthread.php?t=1742566) workaround a step further
And added some triggers to clean up these dodgy character combinations (ff, fi, fl).
Still crashes on initial message read but saves having to manually run the sql query eve time a message contains the character combinations */
-- Working well for me so far --
CREATE TRIGGER insert_Ff AFTER INSERT ON ZWAMESSAGE
BEGIN
UPDATE ZWAMESSAGE
SET ZTEXT = replace( ZTEXT, 'ff', 'f f')
WHERE ZWAMESSAGE.ZTEXT like '%ff%';
END;
CREATE TRIGGER insert_Fi AFTER INSERT ON ZWAMESSAGE
BEGIN
UPDATE ZWAMESSAGE
SET ZTEXT = replace( ZTEXT, 'fi', 'f i')
WHERE ZWAMESSAGE.ZTEXT like '%fi%';
END;
CREATE TRIGGER insert_Fl AFTER INSERT ON ZWAMESSAGE
BEGIN
UPDATE ZWAMESSAGE
SET ZTEXT = replace( ZTEXT, 'fl', 'f l')
WHERE ZWAMESSAGE.ZTEXT like '%fl%';
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment