Author Topic: wxSmith generates Latin1 files in existing Unicode project.  (Read 3410 times)

S.Volkenandt

  • Guest
wxSmith generates Latin1 files in existing Unicode project.
« on: February 22, 2008, 08:59:49 am »
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.
« Last Edit: February 22, 2008, 10:00:10 am by S.Volkenandt »

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith generates Latin1 files in existing Unicode project.
« Reply #1 on: February 22, 2008, 10:35:48 am »
Try changing default encoding to UTF-8 in editor settings.

Regards
   BYO

S.Volkenandt

  • Guest
Re: wxSmith generates Latin1 files in existing Unicode project.
« Reply #2 on: February 22, 2008, 10:48:44 am »
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?

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith generates Latin1 files in existing Unicode project.
« Reply #3 on: February 22, 2008, 11:11:34 am »
Should I file a bug report?

Yup, that would be the best option.

Regards
   BYO