error in read csv (maybe encoding) Error in type.convert.default: invalid multibyte string at '<c9>cole <64>octorale Physique en <ce>le-de-France (Paris)

Hello every one , i'm asking for help
I'm tring to deploy an ap on shinyapps but when i try to import a csv i have a

Error in type.convert.default: invalid multibyte string

i'm pretty sure it's cause by the encoding but i try to force it in the readcsv that doesn't work so how can i succed ?
It already work locally but not in the deploy version.
any thought that could help please.
thank you very much

You're more likely to get useful help if you provide a small reprex illustrating the problem; in particularly, without the data that you're trying to read (or some subsample of it), it's very difficult for anyone to help.

But note that this problem is unrelated to shiny, and you might be able to solve it using a modern csv reading function like readr::read_csv() or data.table::fread().

thank you i will try that and if it don't work i will comme back with an exemple =) but if it not liked to shiny it's weird that it work localy

it don't work now i have Error in : 'read.csv' is not an exported object from 'namespace:readr'

here you have an exemple(that not the full app) but i don't manage to provide file exemple in csv

library(shiny)
library(DT)

Define UI

ui <- shinyUI(fluidPage(

fileInput('target_upload', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'.csv'
)),
radioButtons("separator","Separator: ",choices = c(";",",",":"), selected=";",inline=TRUE),
DT::dataTableOutput("sample_table")
)
)

Define server logic

server <- shinyServer(function(input, output) {
options(shiny.maxRequestSize=32*1024^2)
df_products_upload <- reactive({
inFile <- input$target_upload
if (is.null(inFile))
return(NULL)
df <- readr::read.csv(inFile$datapath, header = TRUE,sep = input$separator)
return(df)
})

output$sample_table<- DT::renderDataTable({
df <- df_products_upload()
DT::datatable(df)
})

}
)

Run the application

shinyApp(ui = ui, server = server)