kyo

Autoit3Wrapper character encoding problem

84 posts in this topic

#1 ·  Posted (edited)

Greetings!

I seem to be having problems with the latest version (provided with 3.3.14.1) of Autoit3Wrapper.

Autoit3Wrapper seems to change the encoding of my source file whenever I change an option it Autoit3Wrapper.

Example before:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=some_icon_whatever.ico
#AutoIt3Wrapper_UseUpx=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <File.au3>
#include <MsgBoxConstants.au3>

; Display a simple messagebox in french

MsgBox(64,"Testing 1-2-3","This is a sample message box with text in french:" & @CRLF & @CRLF & "Problème avec les caractères accentués." & @CRLF & @CRLF & "End of french text")

Example after changing an option in Autoit3Wrapper:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=some_icon_whatever.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <File.au3>
#include <MsgBoxConstants.au3>

; Display a simple messagebox in french

MsgBox(64,"Testing 1-2-3","This is a sample message box with text in french:" & @CRLF & @CRLF & "Problème avec les caractères accentués." & @CRLF & @CRLF & "End of french text")

As you can see, I just removed the "UseUPX" option, and all accented characters are modified, making the program unusable now.

I think that this may be related to the problem reported by @Blumi in his post "Changed in Germen "umlaute" after compiling", as the source file is also modified after compiling - Autoit3Wrapper is executed at that time too.

Or this might be related (but I very much doubt it) to the new problem with SciTE in which word selection now stops at accented characters, and not whitespace characters anymore.

Example:

If I want to select the word "opération", it would either select "op" if I double-click on the beginning of the word, or "ration" if I double-click on the end of the word.  It used to work just fine, but now it doesn't.

Or maybe I'm doing something wrong somewhere...

Thanks for any insight anyone can have on this!

 

Edited by kyo
Precisions...

Share this post


Link to post
Share on other sites



What are the original file encoding setting and what are the result file encoding settings so I can have a look?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

hello, i'm french and i'm having the same problem but only when i do a compile with options

in scite i have set the page to UTF8, but each time i open my file the setting is back to Code page property

so i have to set it again to utf8...

i'm with : autoit v3.3.14.1 and SciTE4AutoIt3.exe from 29-7-2015

Edited by cetipabo

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

UTF8 with or without bom?

Which versionnumber are you using of AutoIt3Wrapper?

 

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

it's UTF8 without bom.

AutoIt3Wrapper 15.729.1555.1  15.729.1555.0

Edited by cetipabo

Share this post


Link to post
Share on other sites

for your information, when i uninstall SciTE4AutoIt3, there is no more problem when i open a file. the encoding is correct.

 

Share this post


Link to post
Share on other sites

In my case it was :

script in encoded in Code page property or UTF8 after Autoit3Wrapper become UTF8 encoded, but encode-selector in Scite always dropped to Code page property. Now, if i change encode-selector in Scite to any UTF8 - non-egnlish texts get restored. This dos not happen with UTF16 encoded scripts

Share this post


Link to post
Share on other sites

There is an automatic detection in SciTE in case the file contains special ANSI characters, else it defaults to UTF8 modde without BOM these days.
I need a file that has this behaviour as my files all work fine till now. Can somebody PM me one?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

i confirm, using UTF16 big endian is a workaround.

Thanks

Share this post


Link to post
Share on other sites

sorry jos,

you can reproduce this problem by creating an blank autoit file and copy the code in the first post of this topic.

set the file encoding to utf8 and save the file.

Now reopen the file, the accents are gone and replaced with è

and if you check the page encoding setting, it is also back to Code page property

test.au3

Share this post


Link to post
Share on other sites

I did and have no problems:

Full SciTE 3.6.0 and AutoIt3Wrapper v.15.729.1555.

SciTE should already be in UTF8 wo Bom mode as that is the default now and pasting the above into an ANSI file and then changing to encoding would indeed potentially screw up the above 127 Ascii characters. Try making the file first utf8 before posting the code.

Above it is also mentioned that Ctrl+F7 causes issues but have not been able to replicate that so please tell me the exact steps to take to see it as well.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

sorry if i don't understand very well...

so here is what i'm doing step by step:

1) right click in a folder to create a new blank autoit file

2) i open this file and i check the encoding (FILE>ENCODING>), it is set by default to : Code page property

3) i change it to UTF8 wo bom

4) i copy paste the code containing accents

5) i save the file and i close it

6) i open the file, now the encoding is set to : Code page property and the accents are replaced by the weird characters

I'm using the latest autoit : v3.3.14.1 and the latest AutoIt Script Editor from your site here : https://www.autoitscript.com/site/autoit-script-editor/downloads/

which  says : SciTE Version 3.5.4     May 17 2015 16:32:11

 

Edited by cetipabo

Share this post


Link to post
Share on other sites

I am using the current Beta SciTE 3.6.0, but don't think that should be different.

When you create a file like you did and open it with SciTE, it should show UTF8 for the encoding unless you have made changes to the Model file used when creating the new file.
Have you done that?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

no i didn't change anything, where this config file is supposed to be ?

is it SciTEUser.properties in C:\Users\xxxx\AppData\Local\AutoIt v3\SciTE

if yes then this file is blank.

Edited by cetipabo

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

What file encoding does SciTE show when you click on the SciTE "New" file icon?

Edit: Please try the current SciTE beta version 3.6.0 to see if that works for you.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

with my default blank SciTEUser.properties

i have : code page property

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

sorry but what beta ? the autoit beta ?

Edited by cetipabo

Share this post


Link to post
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