Hello Christian,
thank you, that helped me ;).
Am Montag, den 14.01.2013, 02:03 +0100 schrieb Christian Krause:
Hi Sven,
On 01/13/2013 06:56 PM, Sven Baus wrote:
> I'm currently trying to build AudioCuesheetEditor for Fedora. Since it
> will be build with xbuild, I tryed the following in my build stage:
> + xbuild /property:Configuration=Release AudioCuesheetEditor.sln
[...]
> gtk-gui/MainWindow.cs(152,51): error CS1012: Too many characters in
> character literal
> gtk-gui/MainWindow.cs(171,52): error CS1012: Too many characters in
> character literal
> gtk-gui/MainWindow.cs(199,53): error CS1012: Too many characters in
> character literal
The build fails, because the compiler expects a single character in the
assignments of these lines. E.g.:
this.entCDTitle.InvisibleChar = '●';
Unfortunately, the offending character is a multi-byte UTF-8 char and
the compiler does not seem to use the correct encoding for that source file.
> As you see, the build fails, but why? On normal terminal I can build the
> solution with "xbuild /property:Configuration=Release
> AudioCuesheetEditor.sln". Has anyone had this problem before?
The reason for the difference is the different set of environment
variables, especially LC_*/LANG. On your shell you have most likely
something like LANG=de_DE.UTF-8 set. However, rpmbuild uses a clean
environment, LANG and LC_* are not set (and so the default is the "C"
locale).
This can be easily verified:
LC_CTYPE=C xbuild /property:Configuration=Release
-> error
LC_CTYPE=en_US.UTF-8 xbuild /property:Configuration=Release
-> compiles fine
For further details you can check
http://www.mono-project.com/FAQ:_Technical ("How does Unicode interact
with Mono?")
In newer upcoming mono releases the default charset for source files is
changed to UTF-8:
https://bugzilla.novell.com/show_bug.cgi?id=676476
https://github.com/mono/mono/commit/71ba975059f5efb9085d4b7a30435deb53e4b5c7
For now you can either make a patch and change these characters or
explicitly set an UTF-8 locale.
Best regards,
Christian