alphabet=c('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','.',' ',',',';',':','?','!','-',"'",'"')
texte=readLines("~/Dropbox/sylvain-rubenthaler/enseignement/m1im/monte-carlo/poly-monte-carlo/fichiers-decodage/texte-daumal.txt")
liste=c()
for (i in 1:nchar(texte))
{
	liste=c(liste,substr(texte,i,i))
}
f=1:36
f=sample(f,la,replace=FALSE,prob=NULL)
liste_codee=c()
for (i in 1:length(liste))
{
	liste_codee=c(liste_codee,alphabet[f[which(alphabet==liste[i])]])
}
fileConn<-file("~/Dropbox/sylvain-rubenthaler/enseignement/m1im/monte-carlo/poly-monte-carlo/fichiers-decodage/texte-d-code.txt")
writeLines(liste_codee,fileConn,sep='\n')
close(fileConn)
