Wordhewer Posted April 12, 2017 Report Share Posted April 12, 2017 When I use the command to append a text variable to a text file, the result appears in Chinese glyphs, not the Roman (English) characters in the variable. This happens no matter which text editor I use to view the output. I don't use Chinese as an optional language on my system, and I can't think of any configuration of mine that would cause this result. I'm not Chinese, my system is not configured for Chinese, and I don't understand why this conversion takes place. I'd appreciate help from anyone familiar with this problem. Thanks! // Steve In Toronto // Quote Link to comment Share on other sites More sharing options...
rberq Posted April 12, 2017 Report Share Posted April 12, 2017 So show us the content of the text variable being appended, and the command(s) used to do the appending. And attach a screen shot of the text editor screen showing the result. Quote Link to comment Share on other sites More sharing options...
rberq Posted April 12, 2017 Report Share Posted April 12, 2017 Never mind. I thought you were doing a late April Fool's joke, but mine does the same thing. Using ME version 3.9.0.1. With Notepad I loaded "abcdefgABCDEFG" into a file, then ran these two macro instructions. Results below. I don't know if it's Chinese or Martian characters, but there it is. Variable Set String %T1% "abcdefgABCDEFG" Variable Modify String: Append %T1% to Text File abcdefgABCDEFG扡摣晥䅧䍂䕄䝆 Quote Link to comment Share on other sites More sharing options...
rberq Posted April 12, 2017 Report Share Posted April 12, 2017 Hmmmmm. Things are looking clearer now. Notepad saved the original file as Unicode, but ME adds ANSI (non-unicode) characters. If you then open the file with Notepad specifying Unicode encoding it looks funny (Chinese). If you specify ANSI when opening it, not quite so funny; the original data has two bytes per character (Unicode), and the appended data looks fine, only one byte per character. ÿþa b c d e f g A B C D E F G abcdefgABCDEFG If you run the macro with the file not existing at all, then it is created as ANSI and the appended data is ANSI and everything looks fine. abcdefgABCDEFG If you create the file from scratch with Notepad and specify ANSI when you save it, then run the macro, everything looks fine. Variable Set String %T1% "abcdefgABCDEFG" Variable Modify String: Append %T1% to Text File abcdefgABCDEFGabcdefgABCDEFG Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.