Archive for October, 2007

Unicode Support in Code::Blocks

Biplab October 26th, 2007

Code::Blocks (C::B) had a long known problem of crashing / locking up while an accented character is used in the code. Or even worse when the encoding of a file is changed from one encoding to another. It was able to support upto UTF-8 encoding with occasional lock-up.

I started working on this around 2-3 months back. But during testing we found that C::B still hangs and it is due to Code-Completion (CC) plugin. The issue was due to the presence of some ANSI functions in Code-Completion parser. Morten then started his work to fix this. It almost resulted to a small re-write of Code-Completion. And we could finally test our Unicode changes with CC enabled.

We tested it for couple of weeks before we found it to be stable enough for further real-life testing by our users. In revision 4548, the first collection of patches were committed (including Morten’s patch on CC). Few users posted some issues which were then quickly resolved. As of writing, the code seems to be quite stable.

So what are the changes that have been made??

There were a number of changes that has been made.

  1. Encoding detection code has been improved by using a portion of MadEdit’s encoding detection code. Currently it can detect, UTF-8, UTF-16 BE/LE, UTF-32 BE/LE with/without BOM. The fall back code has been kept to ANSI (CP-1252 on Windows).
  2. Encoding conversion routine has been overhauled. Now it converts back and forth all supported encodings flawlessly.
  3. Now all the encoding detection and conversion code is much more efficient as it involves minimum disk reads and most of the operation is done in memory buffers (Thanks Thomas for keeping this strict criteria).
  4. The file load routine has been moved from a all in one load-plus-encoding detection code to efficiently distributed code.
  5. File save routine was overhauled to save files with all supported encodings.
  6. Project load routine has been tweaked to reduce the stalling while opening a large project with a large number of open files in it.
  7. Morten made CC parser Unicode compliant so that it can now parse any files without a single lock-up.

I would request users to use Build Revision 4553 onwards to get the most benefit out of it. Please post any related issues in the forum itself. :)

Code::Blocks August-September Month Update Summary

Biplab October 14th, 2007

As usual the update summary is full of new changes made to Code::Blocks and lot of bug fixes.

Summary:

  • Help plugin now supports browsing of Man pages.
  • wxSmith got number of new features including support to visually edit layouts, add events, etc.
  • Support for generated source files in build system.
  • Few critical bugs have been fixed. This included a well known DDE bug, crash at close bug, project file corruption in some cases bug, etc.

Please note that the following changelog is based on SVN commit history of past two months. Detailed and organised changelog is as follows. Continue Reading »