Jump to content

Aut2Exe/Exe2Aut: Unicode bug, or by design?


Recommended Posts

ver 3.2.4.4 on XP Pro, 2000, 2 different computers

Scripts compiled with Aut2Exe v3.2.4.4 and then decompiled end up with null characters inserted as every other character.

Decompiled code is OK if viewed in Scite, or notepad, but a true plain text editor/viewer (like command line edit.com) shows up the null characters

Code comes out looking like this (note: I have replaced the NULLS with spaces in the reproduced piece below, see attachement for decompiled source with Nulls)

;   < A U T 2 E X E   V E R S I O N :   3 . 2 . 4 . 4 >

 ;   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 ;   < A U T 2 E X E   I N C L U D E - S T A R T :   C : \ T E S T \ H e l l o W o r l d . a u 3 >

 ;   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 M s g B o x ( 0 , " H I " , " H e l l o   W o r l d " )

 ;   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 ;   < A U T 2 E X E   I N C L U D E - S T A R T :   C : \ T E S T \ H e l l o W o r l d . a u 3 >

 ;   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Also, the first two characters of the decompiled script are high-ascii but appear to change from script to script.

The resulting source seems to run and compile OK, but if you save it in Scite it still saves the extra NULL characters.

So, if you're using a plain text editor (which I do from time-to-time), it makes it really hard to edit.

Also decompiled source is of course twice as large as it needs to be due to all the extra nulls.

Just tested with Aut2ExeA and the decompiled source is normal, without extra nulls.

So can anyone tell me if this is a by-product of the new unicode support, or is it a bug?

Thanks

HelloWorld.au3

Link to comment
Share on other sites

  • Developers

Isn't this what Unicode is all about ? It uses 2 positions to define 1 character.

To change the saved for to ansi in SciTE you just do : File/Encoding/Code Page Properties and save the file.

:)

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.
  :)

Link to comment
Share on other sites

Isn't this what Unicode is all about ? It uses 2 positions to define 1 character.

Thanks JdeB.

I've been using AutoIt since v2.1 (1999?), but the mechanics of this Unicode stuff are new to me.

After your reply, I did some googling and found http://unicode.org/ a good source of info for other unicode-newbies like me.

Thanks again.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...