Skip to content

Instantly share code, notes, and snippets.

@danielAlbuquerque
Created August 3, 2018 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielAlbuquerque/bceb73a4f998f35ee156f34cf1a81021 to your computer and use it in GitHub Desktop.
Save danielAlbuquerque/bceb73a4f998f35ee156f34cf1a81021 to your computer and use it in GitHub Desktop.
Remove caracteres especiais
#INCLUDE "TOTVS.CH"
User Function RemoveEspec(cWord)
cWord := OemToAnsi(AllTrim(cWord))
cWord := FwNoAccent(cWord)
cWord := FwCutOff(cWord)
cWord := strtran(cWord,"ã","a")
cWord := strtran(cWord,"º","")
cWord := strtran(cWord,"%","")
cWord := strtran(cWord,"*","")
cWord := strtran(cWord,"&","")
cWord := strtran(cWord,"$","")
cWord := strtran(cWord,"#","")
cWord := strtran(cWord,"§","")
cWord := strtran(cWord,"ä","a")
cWord := strtran(cWord,""+'"'+"","")
Return cWord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment