Created
June 16, 2011 18:34
-
-
Save rafaelbernard/1029899 to your computer and use it in GitHub Desktop.
Substitui caracteres win1252 por UTF-8
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
-- DROP FUNCTION substitui_win1252(texto); | |
CREATE OR REPLACE FUNCTION substitui_win1252(texto text) | |
RETURNS text AS | |
$$ | |
BEGIN | |
texto := replace(replace(replace(replace(replace(texto, '', ''''), '', '"'), '', '"'), '','•'), '', '-')::text; | |
RETURN texto; | |
END; | |
$$ | |
LANGUAGE plpgsql; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment