User forums > Using Code::Blocks

UTF-8 handling by wxSmith

(1/2) > >>

paul_c_weiss:
Hello!
I have been working with code::blocks 13.12 together with wxWidgets 2.8, quite satisfactorily. All my projects resort to UTF-8 encoding.
Recently, I have installed the 16.01 version together with wxWidgets 3.0.

To port my test project, I have simply manually edited the .cpb files, to have it point to the correct wxWidgets repertories.
This works quite nicely. The project complies and runs OK, with a small exception:
The accentuated characters which I have defined in the wxSmith "labels" are not correctely handled - i. e. they are not seen as UTF-8
and give the usual  character salad which appears in such cases...

Preforming some tests, I realized that replacing the _() macro by the _T() one did yield the right result (why????)

Unfortunately, wxSmith resorts to the _() macro in its automatically generated sections, which I cannot safely change.
Thus I can only correct the problem by programatically setting the label at a later stage, which is not quite satisfactory.

Is there somewhere an option that I have overlooked and which allows to get the right behaviour?
Or is this a bug?

Thanks in advance.










BlueHazzard:

maybe this can help:
"Settings->Editor->wxSmith Settings->Other Settings->Non I18N Strings"

greetings

paul_c_weiss:
Thank you!
Unfortunately, I cannot see such an option as:

"Settings->Editor->wxSmith Settings->Other Settings->Non I18N Strings"

under Code::Blocks 16:01 as downloaded...

BlueHazzard:
it is possible that the option was added after the release...

you can try a nightly build from the forum: http://forums.codeblocks.org/index.php/topic,21090.0.html

greetings

paul_c_weiss:
Hello!
To avoid re-installing a nightly build, I tried and edited the following section of the project file:

<wxsmith version="1">
            <gui name="wxWidgets" src="SudokuApp.cpp" main="SudokuFrame" init_handlers="necessary" language="CPP" />
            <resources>
               <wxFrame wxs="wxsmith/Sudokuframe.wxs" src="SudokuMain.cpp" hdr="SudokuMain.h" fwddecl="0" i18n="1" name="SudokuFrame" language="CPP" />
            </resources>
         </wxsmith>

Obviously by replacing i18n="1"by i18n="0"

Is this equivalent to changing the option? - I hoped so!

Now simply rebuilding the project has no effect.
If I force a regeneration of the wxSmith-generated parts of the program, by performing a minute modification of the
.wxs file, then, after rebuilding, I get an execution error ( status -1073741819).
But wxSmith is still using the _() macro which is not satisfactory...

Do you have reason to think that the nightlx build may behave differently??

Regards,

Navigation

[0] Message Index

[#] Next page

Go to full version