PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Non-ANSI char in source code cause build errors
https://forum.pdfsharp.net/viewtopic.php?f=3&t=3256
Page 1 of 1

Author:  simon_li [ Sat Jan 02, 2016 3:53 am ]
Post subject:  Non-ANSI char in source code cause build errors

Today I tried to build PDFsharp-1_50-beta3b but got some errors:
"some bytes have been replaced with the unicode substitution character while loading file".

I am using Windows 10 version 1511 Chinese locale, Visual Studio 2015 Update 1.
It turns out there are some non-ANSI char in 2 source files.

I fixed the errors by the following code changes:

\PDFsharp\src\PdfSharp\Drawing.BarCodes\DataMatrixImage.cs :
Line 240 to
Code:
s3 = "`abcdefghijklmnopqrstuvwxyz{|}~\u00b1";

Line 245 to
Code:
s3 = "`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\u00b1";


\PDFsharp\src\PdfSharp\Pdf.IO\Chars.cs :
Line 181 to:
Code:
public const char SoftHyphen = '\u00AD';  // char(173)

Line 185 to:
Code:
public const char Currency = '\u00A4';


Could you please review my code changes?

Author:  () => true [ Sat Jan 02, 2016 8:45 am ]
Post subject:  Re: Non-ANSI char in source code cause build errors

Hi!
Thanks for the feedback.
simon_li wrote:
It turns out there are some non-ANSI char in 2 source files.
Source files with Unicode characters should have the UTF-8 BOM. I guess that will be how we will fix this issue.

Author:  Thomas Hoevel [ Mon Jan 11, 2016 9:47 am ]
Post subject:  Re: Non-ANSI char in source code cause build errors

Hi!

The UTF BOM was missing with both files. The next time we release an update it should compile without this issue.
Thanks for your feedback.

Author:  Misiu [ Thu Jul 28, 2016 10:20 am ]
Post subject:  Re: Non-ANSI char in source code cause build errors

Thomas Hoevel wrote:
Hi!

The UTF BOM was missing with both files. The next time we release an update it should compile without this issue.
Thanks for your feedback.


Thomas when do You guys plan to release update? Any dates? On GitHub I can find only beta3 release

Author:  Thomas Hoevel [ Thu Jul 28, 2016 11:01 am ]
Post subject:  Re: Non-ANSI char in source code cause build errors

Misiu wrote:
Any dates?
Not from me, not now. Sorry.
viewtopic.php?p=10006#p10006

Author:  Gerben Vos [ Thu Aug 04, 2016 4:58 pm ]
Post subject:  Re: Non-ANSI char in source code cause build errors

The following files are encoded using UTF-16 in the distributed source code zip file. They compile, but it makes diffing difficult. Please distribute them as UTF-8 instead.

src\PdfSharp\Fonts.OpenType\GlyphDataTable.cs
src\PdfSharp\Fonts.OpenType\IndexToLocationTable.cs
src\PdfSharp\Fonts.OpenType\OpenTypeFontTables.cs
src\PdfSharp\Fonts.OpenType\OpenTypeFontface.cs
src\PdfSharp\Fonts.OpenType\TableDirectoryEntry.cs
src\PdfSharp\Pdf.Advanced\PdfCIDFont.cs
src\PdfSharp\Pdf.Content\CLexer.cs

Author:  Thomas Hoevel [ Tue Aug 16, 2016 11:52 am ]
Post subject:  Re: Non-ANSI char in source code cause build errors

Gerben Vos wrote:
The following files are encoded using UTF-16 in the distributed source code zip file.
They will be UTF-8 when we ship the next version.
I also found some ANSI files which I also changed to UTF-8.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/