CodeFormatter destroys non UTF-8 files

Post here any ideas/problems/suggestions you have regarding CodeLite's CodeFormatter (AStyle) plugin
markos26
CodeLite Curious
Posts: 5
Joined: Wed Nov 26, 2014 10:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

CodeFormatter destroys non UTF-8 files

Post by markos26 » Wed Nov 26, 2014 10:39 pm

When i run "CodeFormatter" it deletes every non UTF-8 file and leaves it with two lines. Check the attachments
You do not have the required permissions to view the files attached to this post.

User avatar
eranif
CodeLite Plugin
Posts: 5812
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by eranif » Wed Nov 26, 2014 10:50 pm

Which codelite version?
Which OS?
Which formatter engine do you use?
Make sure you have read the HOW TO POST thread

markos26
CodeLite Curious
Posts: 5
Joined: Wed Nov 26, 2014 10:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by markos26 » Wed Nov 26, 2014 10:59 pm

Codelite 7.0 BETA - Nov 23, 2014

Windows XP SP3

Right click on ProjectName -> Source Code Formatter -> Yes

User avatar
eranif
CodeLite Plugin
Posts: 5812
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by eranif » Wed Nov 26, 2014 11:03 pm

To check the engine:
Plugins->Source Code Formatter -> Options

Under the "C++" section, you should see which engine is being used (clang-format or AStyle)

Eran
Make sure you have read the HOW TO POST thread

markos26
CodeLite Curious
Posts: 5
Joined: Wed Nov 26, 2014 10:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by markos26 » Wed Nov 26, 2014 11:09 pm

The formatter engine is AStyle.

Thanks

User avatar
eranif
CodeLite Plugin
Posts: 5812
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by eranif » Wed Nov 26, 2014 11:12 pm

The formatter engine is AStyle.
Thanks.

OK, so what happens when you switch to clang-format? does it work for you?

Eran
Make sure you have read the HOW TO POST thread

markos26
CodeLite Curious
Posts: 5
Joined: Wed Nov 26, 2014 10:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by markos26 » Wed Nov 26, 2014 11:15 pm

Converting the source file to UTF-8 with a text editor, the CodeFormatter ( AStyle ) works correctly
I 'll try the clang-format soon

markos26
CodeLite Curious
Posts: 5
Joined: Wed Nov 26, 2014 10:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeFormatter destroys non UTF-8 files

Post by markos26 » Wed Nov 26, 2014 11:36 pm

Formatting the same source files with clang-format engine, i have no problems

Post Reply