Created
June 23, 2014 23:26
-
-
Save jonathan-wheeler/0f8235f5904365e3c75a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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
I tried to create the triggers but it says there's a syntax error (which is not the case). It doesn't care what code I put in the trigger, it also complains about an imaginary error.