Created
October 30, 2025 14:08
-
-
Save DATAUNIRIO/bda40212cca513f9a99390060cc5557f to your computer and use it in GitHub Desktop.
como corrigir erro de encoding
This file contains hidden or 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
| iconv(Titanic$Classe, "latin1", "UTF-8") | |
| library(stringi) | |
| # Seu texto com problema | |
| texto <- "Tripula\xe7\xe3o" | |
| # Converter escapes Unicode para caracteres | |
| texto_corrigido <- stri_unescape_unicode(gsub("\\\\x", "\\\\u00", texto)) | |
| print(texto_corrigido) | |
| # [1] "Tripulação" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment