Hello R developers Please i need ur help with Arabic Data in R

My data is arabic character, i tried every thing, even chat gpt can'y answer this,

my code is


Sys.setlocale(category = "LC_ALL", locale = "en_US.UTF-8")

library(odbc)

library(RODBC)

con <- dbConnect(odbc(),

             Driver = "SQL Server",

             Server = "******",

             Database = "WarehouseDB",

             UID = "***",

             PWD = "******",

             encoding="UTF-8")

#data <- dbGetQuery(con,'

select * from arabic_table

#')

data <- dbGetQuery(con,'select * from arabic_table' , encoding = "UTF-8")

data

dbDisconnect(con)

odbcClose(con)

i tried every thin encoding ="1256 Arabic" and many more until i gave up, i used ssis to retrieve data into csv file because i though it will be easier :smile: but extract with 1256 arabic windwos then i used this code in r
Sys.setlocale("LC_CTYPE", "arabic" )
Arosa_old <-read.csv(Path, stringsAsFactors = TRUE) and kaapoon the arabic data worked so fine finally except it only returns about 1802700 except of the 3 million raws :frowning: so i used this code
library("readr")
Central <- readr::read_csv(path, locale = locale(encoding = "UTF-8"))
retrieved all data with the same arabic problem, it took me two minus to finalize this in python, and two day in r and yet not apple to solve this, any help please??!!

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.