DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`string_checkPrintableAndSpanishChars`( vString VARCHAR(255) ) RETURNS tinyint(1) DETERMINISTIC BEGIN /** * Validates whether the input string contains only printable characters * and Spanish special characters (such as ¡, ÿ, etc.). * * @vString string to check */ RETURN vString REGEXP '^[ -~¡-ÿ]*$'; END$$ DELIMITER ;