KanikaVarma / sudzc

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

SoapDictionary.h is in UTF-8, which LVVM doesn't seem to like. #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add sudzc zip file code to a project
2. Set project to use LVVM/Clang
3. Build

What is the expected output? What do you see instead?
It should compile, but the compiler chokes on SoapDictionary.h

What version of the product are you using? On what operating system?
XCode 4

Please provide any additional information below.
Xcode only shows a very cryptic "expected identifier or '('" pointing at the 
beginning of SoapDictionary.h, but building from command line reveals that 
SoapDictionary.h starts with the utf-8 byte order mark <EF><BB><BF>, which 
LVVM/Clang doesn't seem to understand.

This is how the file came out of the zip file. Please make sure it is stored in 
ASCII format, not UTF-8.

Original issue reported on code.google.com by michiel....@lpsvcs.com on 27 Apr 2011 at 2:50

GoogleCodeExporter commented 9 years ago
The same applies to some other files:

jmvw@minimichiel:~/Documents/Xcode projects/Test/Soap$ file *
NSData+Base64.h:       ASCII text
NSData+Base64.m:       ASCII c program text
NSMutableArray+Soap.h: ASCII C++ program text, with CRLF line terminators
NSMutableArray+Soap.m: ASCII C++ program text, with CRLF line terminators
Soap.h:                ASCII c program text, with CRLF line terminators
Soap.m:                ASCII c program text, with CRLF line terminators
SoapArray.h:           ASCII c program text
SoapArray.m:           ASCII c program text, with CRLF line terminators
SoapDelegate.h:        ASCII c program text
SoapDictionary.h:      UTF-8 Unicode (with BOM) text, with CRLF line terminators
SoapDictionary.m:      UTF-8 Unicode (with BOM) text, with CRLF line terminators
SoapFault.h:           ASCII c program text, with CRLF, LF line terminators
SoapFault.m:           ASCII c program text, with CRLF line terminators
SoapHandler.h:         ASCII c program text
SoapHandler.m:         ASCII c program text
SoapLiteral.h:         ASCII C++ program text
SoapLiteral.m:         ASCII C++ program text
SoapNil.h:             ASCII C++ program text
SoapNil.m:             ASCII C++ program text
SoapObject.h:          ASCII c program text, with CRLF line terminators
SoapObject.m:          ASCII c program text, with CRLF line terminators
SoapParameter.h:       ASCII C++ program text
SoapParameter.m:       ASCII C++ program text, with CRLF, LF line terminators
SoapReachability.h:    ASCII C++ program text
SoapReachability.m:    UTF-8 Unicode C++ program text
SoapRequest.h:         ASCII c program text
SoapRequest.m:         ASCII c program text, with CRLF line terminators
SoapService.h:         UTF-8 Unicode (with BOM) text, with CRLF line terminators
SoapService.m:         UTF-8 Unicode (with BOM) text, with CRLF line terminators

The following commands will take care of it:

jmvw@minimichiel:~/Documents/Xcode projects/Test/Soap$ mkdir ../Soap1
jmvw@minimichiel:~/Documents/Xcode projects/Louie/Soap$ for file in *; do iconv 
--from-code UTF-8 --to-code US-ASCII -c < $file > ../Soap1/$file; done

Original comment by michiel....@lpsvcs.com on 27 Apr 2011 at 3:08

GoogleCodeExporter commented 9 years ago
The default example project created by Sudzc fails to build with a clean 
install of Xcode.

"Parse Issue: Expected a type" errors are reported in several places by Analyze.

I will try again after doing the UTF-8 conversion.

Original comment by rad...@gmail.com on 7 Apr 2012 at 4:52

GoogleCodeExporter commented 9 years ago
I have what appears to be the same problem, though the errors are in slightly 
different classes and the fix in the first comment doesn't work. My errors come 
from SoapService.h; I get 4 parse errors, all ultimately pointing at the line:
@property (retain) NSString* namespace;
One saying it expects a ; after the *, one saying property requires fields to 
be named, one saying expected unqualified-id.

I tried michiel's fix, running:

do iconv --from-code UTF-8 --to-code US-ASCII -c < Filename > < Temp Filename>

And then copying the temp file to replace the original; this hasn't fixed the 
errors, however! Tried cleaning the project - any other suggestions I can try?

Original comment by dsbel...@gmail.com on 26 Apr 2012 at 3:23