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 »

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: 6367
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 »

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 »

Codelite 7.0 BETA - Nov 23, 2014

Windows XP SP3

Right click on ProjectName -> Source Code Formatter -> Yes
User avatar
eranif
CodeLite Plugin
Posts: 6367
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 »

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 »

The formatter engine is AStyle.

Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6367
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 »

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 »

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 »

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