Forum: Wordfast support
Topic: Merge TXML files, and then split them again
Poster: Samuel Murray
Post title: Update
[quote]yongzhou wrote:
But when double-clicking to open the merged txml, it still go: "Invalid document format..." and won't open. ... I can sent you the txml if you'd like. [/quote]
Just an update on what happened:
Yongzhou sent me some sample files, and I determined that he had placed the previously merged TXML file in the same folder as the other TXML files when he performed the second merge, which resulted in that merged file being invalid as well. It is important to note that the script processes all TXML files in the folder where the script is, as well as all TXML files in all subfolders of that folder.
Yongzhou also sent me the original files, and I was able to merge them so that both WFP on my computer and WFP on Yongzhou's computer could open it. However, Yongzhou reported that he is still unable to merge the files himself (even after making sure that no other TXML files are in the same folder as the script), in such a way that WFP accepts the file.
It would appear to me that on Yongzhou's computer, my script reads two of the five TXML files using the wrong file encoding (not as UTF8N but something else, apparently). TXML files are in UTF8 without byte order mark.
Topic: Merge TXML files, and then split them again
Poster: Samuel Murray
Post title: Update
[quote]yongzhou wrote:
But when double-clicking to open the merged txml, it still go: "Invalid document format..." and won't open. ... I can sent you the txml if you'd like. [/quote]
Just an update on what happened:
Yongzhou sent me some sample files, and I determined that he had placed the previously merged TXML file in the same folder as the other TXML files when he performed the second merge, which resulted in that merged file being invalid as well. It is important to note that the script processes all TXML files in the folder where the script is, as well as all TXML files in all subfolders of that folder.
Yongzhou also sent me the original files, and I was able to merge them so that both WFP on my computer and WFP on Yongzhou's computer could open it. However, Yongzhou reported that he is still unable to merge the files himself (even after making sure that no other TXML files are in the same folder as the script), in such a way that WFP accepts the file.
It would appear to me that on Yongzhou's computer, my script reads two of the five TXML files using the wrong file encoding (not as UTF8N but something else, apparently). TXML files are in UTF8 without byte order mark.