I tested 280Z28's unicode.patch under a unicode build and it fixes the problem as well as uses an unsigned int for the crc as it should (the xml routines accept and int and overflow giving a negative crc if it gets an unsigned long - this was one of the problems it seems).
Building a clean ansi build to test on but it should work. There may be another unicode bug re syntax highlighting but it looks like a seperate issue. Have to look at a couple of different revisions (both ansi & unicode) to isolate it: basically open a .cpp, click settings->editor->OK. do that twice in a row and the syntax highlighting dissapears - 280Z28 pointed it out and I haven't got a chance to look at it further but right now: 1512 ansi doesn't exhibit, 1537 unicode does (but this should be a seperate thread anyway).
Also, since people have said they couldn't get unicode to build for whatever reasons, here's all the relevant settings that should be checked (they assume a WX_SFX custom variable that should be blank for ansi and u for unicode, just to be appended to msw$(WX_SFX) to make switching back and forth easier (present in the unicode.patch)) :
0 compile either an ansi (UNICODE=0) or unicode (UNICODE=1) build - at the cmd.exe prompt
type:
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 VENDOR=cb
(if you get an error then update to a later mingw (make >= 3.80 needed))
1 checkout svn source with tortoisesvn.
2 right click checked out directory and apply patch - apply unicode.patch - right-click on
file list -> patch all (this won't be necessary once the unknown exception bug fix is in svn)
3 open CodeBlocks-NewBuild.cbp with a recent codeblocks build (download one of the svn
binaries you can find links to in the forums)
4 goto project -> build options
5
ANSI
====
Compiler->#defines
make sure wxUSE_UNICODE if present is:
wxUSE_UNICODE=0
Custom variables
WX_CFG=NonUnicode
WX_SFX=
rename wxWidgets-2.6.2\lib\gcc_dll to wxWidgets-2.6.2\lib\gcc_dllNonUnicode
open wxWidgets-2.6.2\lib\gcc_dllNonUnicode\msw\wx\setup.h
it should have
#define wxUSE_UNICODE 0
UNICODE
=======
Compiler->#defines
make sure wxUSE_UNICODE if present is:
wxUSE_UNICODE=1
Custom variables
WX_CFG=NonUnicode
WX_SFX=u
rename wxWidgets-2.6.2\lib\gcc_dll to wxWidgets-2.6.2\lib\gcc_dllUnicode
open wxWidgets-2.6.2\lib\gcc_dllUnicode\msw\wx\setup.h
it should have
#define wxUSE_UNICODE 1
6 save the project and exit CodeBlocks. This is necessary so the custom variables get set
and reloaded.
7 hit compile and if it prompts you to set the wx variable, just browse to the
wxWidgets-2.6.2 directory and hit ok
8 let it compile and run update.bat once it finishes
Those should be the only settings that affect ansi vs. unicode building.
Update: OK tested and the patch works on ansi as well. Looked over all the diffs and everything looks clean. It's a merge of thomas' main.patch.txt and changes made by 280Z28. I'll post the link to the file for now:
280Z28: if you have a more recent version or whatever I'll take the link down, but wanted to have something people could look over now as it tests and looks fine for clean checkouts of both unicode and ansi builds.
http://www.geocities.com/grv575/unicode.zipFinally, the syntax highlighting thing looks like a unicode only thing - doesn't show up in ansi builds but does in unicode (both with and without the unicode.zip patch so it's a seperate issue). A third seperate <snip...lies about some nonexistant behavior deleted>