Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/* 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