Although the Romanian fonts are the ones that can be inserted using the Romanian language, the STANDARD version, the ones compatible with all kinds of applications/platforms (including MySQL) are the LEGACY ones. The sensitivity is at s and ts.
A small function, adjustable of course, is displayed below.
1 2 3 4 5 6 7 8 9 10 11 |
DROP FUNCTION IF EXISTS fc_diacr; CREATE FUNCTION fc_diacr (valoare VARCHAR(255)) RETURNS VARCHAR(255) DETERMINISTIC RETURN REPLACE( REPLACE( REPLACE( REPLACE(valoare , 'Ș', 'Ş') , 'ș', 'ş') , 'Ț', 'Ţ') , 'ț', 'ţ'); |
DETERMINISTIC functions always return the same result each time they are called with a specific set of input values.
NONDETERMINISTIC functions can return different results each time they are called with a specific set of input values.
For example, according to Microsoft the AVG function always returns the same result, but the GETDATE function, which returns the current DateTime value, always returns a different result.
If this attribute is missing, then it will be considered NONDETERMINISTIC
NONDETERMINISTIC functions can return different results each time they are called with a specific set of input values.
For example, according to Microsoft the AVG function always returns the same result, but the GETDATE function, which returns the current DateTime value, always returns a different result.
If this attribute is missing, then it will be considered NONDETERMINISTIC
Source: StackOverflow.com