cyberdstar / muparserx

Automatically exported from code.google.com/p/muparserx
Other
0 stars 0 forks source link

FIle encoding prevents muparserx from compilation #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download latest code svn
2. Compile example with latest GCC

What is the expected output? What do you see instead?
Everything compiles OK. Compilation fails on file mpPackageUnit.cpp. GCC 
complains that it cannot ENCODE character "µ" on line 78. 

What version of the product are you using? On what operating system?
Latest from svn, GCC-based compilers

Please provide any additional information below.
Actually, used file encoding is NOT ok on all platforms (except Windows). 
Properly set GCC is able to encode UTF-8/16 and other major encoding. I had to 
manually revert encoding of file to UTF-8 to successfully compile. I recommend 
primary developer to change his default encoding in Visual Studio settings and 
revert encoding of current files (if he is not able to do that, i can help - 
unix tool recode does thhat job in one minute).

Original issue reported on code.google.com by Rotter.M...@gmail.com on 28 Jan 2013 at 3:45

GoogleCodeExporter commented 9 years ago
I can't reproduce this issue with Linux mint/GCC 4.6.3. What platform did this 
happen on? 

Original comment by ib...@gmx.info on 28 Jan 2013 at 7:22

GoogleCodeExporter commented 9 years ago
latest archlinux - gcc 4.7.2 i think

Original comment by Rotter.M...@gmail.com on 28 Jan 2013 at 8:15

GoogleCodeExporter commented 9 years ago
Unfortunately there is no good answer to this problem. My top priority is 
ensuring the archive is compilable on as many platforms as possible. In this 
case it may actually mean i have to remove the offending code entirely. Here is 
why:

The main development platform is windows 7/VS2010 thats not likely to change 
despite the fact that i do some coding with qt creator. There does not seem to 
be a viable way of making VS2010 save UTF-8 (without signature or BOM) as the 
default. Moreover a quick google search reveals that the microsoft compiler 
cl.exe has issued with UTF-8 when saved without signature. That may be the 
reason why VS2010 does append a signature to each UTF-8 file it saves even if 
it was load without a signature. So much for the failures of VS2010/cl.exe. GCC 
in turn seems to have issued with reading UTF-8 containing signatures as it 
prefers the plain UTF-8 flavor. Whatever i choose i will cause problems on the 
other side of the operating system spectrum. I have no idea why archlinux is 
failing whilst Ubuntu/Linux Mint seem to accept the code. 

I will check this myself yet but if this all is true the only solution i see is 
not defining an operator named "µ" at all and sticking to Codepage 1252.

Original comment by ib...@gmx.info on 29 Jan 2013 at 10:46

GoogleCodeExporter commented 9 years ago

Original comment by Rotter.M...@gmail.com on 4 Feb 2013 at 1:37

GoogleCodeExporter commented 9 years ago
I changed encoding of files, now it works, checked under linux/windows - visual 
studio/makefile/qt creator -> works.

Recommendation: save newly created files in utf-8 encoding, bom does not matter.

Used tool: recode

Original comment by Rotter.M...@gmail.com on 5 Feb 2013 at 8:34

GoogleCodeExporter commented 9 years ago
I'm not entirely sure whether we've seen the last of this. Files explicitely 
saved in vs2010 as utf-8 are not listed as utf-8 when viewed with notepad++. I 
have still a lot of files listed with ansi coding in the repository. On the 
bright side: VS2010 seems to retain utf-8 when processing a file that is utf-8 
encoded.

Original comment by ib...@gmx.info on 5 Feb 2013 at 10:52