News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

wxSmith generates Latin1 files in existing Unicode project.

Started by S.Volkenandt, February 22, 2008, 08:59:49 AM

Previous topic - Next topic

S.Volkenandt

Hello everybody,

I have one issue regarding wxSmith in an already existing Makefile project. When started, we used wxFormBuilder, but later decided to switch to wxSmith. The project is Unicode, which works for all non-wxSmith sources, but the files generated by wxSmith always end up in Latin1, which results in the following compiler message on Stringliterals containing non-ASCII-characters:

file.cpp:88:1: converting to execution character set: Illegal byte sequence

After converting these files using iconv -f iso-8859-1 -t utf-8 compiling works fine, until I change something in the form, which results in wxSmith saving the file as Latin1 again.

The same happens when I try it in a newly created unicode wxWidgets-project.

Is there any possibility to tell wxSmith to generate UTF-8 source files?

OS: WinXP
Compiler: MinGW 3.4.5
CodeBlocks: SVN 4837 (Win32 Unicode Build)

Regards,
Sascha Volkenandt

EDIT:
Apparently, when I open the iconv-converted file within the CodeBlocks-Editor prior to opening the form in wxSmith, it can handle changes without changing encoding back to Latin1, even when I add problematic characters.

byo

Try changing default encoding to UTF-8 in editor settings.

Regards
   BYO

S.Volkenandt

UTF-8 already is the default. The problem only occurs when the source file is NOT opened within the source editor while wxSmith saves changes. Since I use the generated classes as base classes, I normally wouldn't need them in the source editor at all.

But opening all wxSmith-generated cpp-files in the source editor before changing anything in the forms editor is a workaround. So for me, this has changed from "annoying" to "minor issue" :).

Should I file a bug report?

byo