Hello, I am using the following code to import the content of several txt file, but stata does not recognise the accents and some other characters (text is in french). Can I fix this while importing the files or should I act directly on the txt before importing them? Thanks
local filenames: dir "." files "*.txt"
tempfile building
save `building', emptyok
foreach f of local filenames {
clear
set obs 1
gen filename = "`f'"
gen strL contents = fileread("`f'")
append using `building'
save `"`building'"', replace
}
use `building', clear
local filenames: dir "." files "*.txt"
tempfile building
save `building', emptyok
foreach f of local filenames {
clear
set obs 1
gen filename = "`f'"
gen strL contents = fileread("`f'")
append using `building'
save `"`building'"', replace
}
use `building', clear
Comment