kctvt Posted January 9, 2010 Posted January 9, 2010 I'm Vietnamese, and I'm writting a programe can copy everything in file to another file, and save.I have 2 file:+ Noidung.txtTa là con người, ta có thể đọc, có thể viết.Ta là loài có số lượng đông nhất trên trái đất.Ta là loài có trí óc thông minh nhất trái đất.+ Test.txt1I want to copy everything in Noidung.txt and paste to Test.txt , and save.And this my code :#include <File.au3>#include <Array.au3>Dim $noidung_FileReadToArray("noidung.txt",$noidung)Dim $id_FileReadToArray("Test.txt",$id)_ArrayConcatenate($id,$noidung)_FileWriteFromArray("Test.txt",$id,1)This's results after run the programe, I open Test.txt :15Ta là con ngu?i, ta có th? d?c, có th? vi?t.Ta là loài có s? lu?ng dông nh?t trên trái d?t.Ta là loài có trí óc thông minh nh?t trái d?t.I want to copy everything in Noidung.txt and paste to Test.txt , and save. But, I cant. I cant read Test.txt because the content'Test.txt is Error.Encoding in Autoit is UTF-8Encoding in Noidung.txt is UTF-8Encoding in Test.txt in the first time is UTF-8But Encoding in Test.txt in the last time is ASNI => I cant read.So, what I have to do rightnow ?
Developers Jos Posted January 9, 2010 Developers Posted January 9, 2010 Try current Beta or make your own UDF because the _FileReadToArray() and _FileWriteFromArray() Open the files in Ascii. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now