Jump to content
Macro Express Forums

Append Variable To File — Results In Chinese!


Wordhewer

Recommended Posts

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 //

 

Link to comment
Share on other sites

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扡摣晥䅧䍂䕄䝆਍

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...