← Back to team overview

kicad-developers team mailing list archive

UTF8 source files


We introduced a patch today which introduces UTF8 encoding into a couple of source files,
then made a policy decision to allow UTF8 string constants in 8 bit strings.  So this is
currently about 3 places only, nothing to worry about yet.

The only time you can be sure you have an 8 bit string is if it is not wrapped in wxT().

pcb_calculator uses some 8 bit strings.  In the future we will see more as wx 2.8 fades away.

You should setup your programming editors to use UTF-8 encoding in the near future.

After doing that, to check your editor, try loading from source tree:


Then look at line 872.

The "um" text in  the patch should show the greek mu in the micron const string.

Note that ASCII files pass as UTF-8 files, but not vice versa.  So for a long time, and on
most *.cpp files there will never be any difference.  Patches will still come in as ASCII,
especially from new people.   Only when we have:

a) in internationally recognized character, that is
b) not ASCII, in a
c) 8 bit string.

will this ever be an issue moving forward.  And until wx 2.8 goes away, it is very limited
in where we can *know* we have 8 bit strings, due to the wxT() wrapper in play in wx 2.8.
 wxT() abstracts the bitness of the strings on different platforms and builds.