View previous topic :: View next topic |
Author |
Message |
imgen
Joined: 20 Mar 2009 Posts: 2
|
Posted: Fri Mar 20, 2009 12:47 pm Post subject: lots compile error occurred when compiling PDFSharp |
|
|
hundreds of error CS1010: Newline in constant and error CS1012: Too many characters in character literal happened when compiling PDFSharp library. My IDE is vs2008. It seems like it is those unicode character in Chars.cs, XColorResourceManager.cs and PdfDictionary.cs cause this problem. But I don't know how to fix it. Can somebody please help me? |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Fri Mar 20, 2009 2:02 pm Post subject: |
|
|
I just checked "XColorResourceManager.cs": it contains no unicode characters. VS2008 shows encoding as "1252" and it compiles correctly.
Which encoding does your VS show for XColorResourceManager.cs? _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
imgen
Joined: 20 Mar 2009 Posts: 2
|
Posted: Fri Mar 20, 2009 4:36 pm Post subject: About the encoding |
|
|
I don't know. But it's got be a problem of encoding cause there are some very strange characters in the file. And I don't know how to check the current encoding of the file or how to change the encoding of the file in VS. Can you tell me? Forgive my lack of knowledge and experience. |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Fri Mar 20, 2009 5:03 pm Post subject: |
|
|
Open the file in VS 2008 and look at File => Advanced Save Options.
These .cs files are plain text files (they have no encoding).
I presume the default encoding of your computer is used. Default should be 1252 in the western world, therefore it works for many people.
If the files had the correct UTF encoding it should work for all people (that is our mistake).
I can send you UTF-encoded versions of those files if you send me your e-mail address via PM. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Mar 23, 2009 8:03 am Post subject: |
|
|
You should be able to correct the problem yourself:
When you select File -> Open -> File... in VS 2008, there is a small triangle (pointer) beside the Open button.
Select Open With from the menu, then select CSharp Editor with Encoding.
The files that cause problems will all open with "Western European (Windows) - Codepage 1252".
Then select File -> Advanced Save Options and select "Unicode (UTF-8 with signature) - Codepage 65001" and click OK.
The default setting for opening files is "auto detect". Maybe there's something different in your operating system that affects how this auto detection works. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
|