PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 10:15 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Jan 02, 2016 3:53 am 
Offline

Joined: Sat Jan 02, 2016 3:22 am
Posts: 1
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?


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 02, 2016 8:45 am 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 339
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.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 11, 2016 9:47 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 28, 2016 10:20 am 
Offline

Joined: Thu Jul 28, 2016 10:15 am
Posts: 1
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 28, 2016 11:01 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
Misiu wrote:
Any dates?
Not from me, not now. Sorry.
viewtopic.php?p=10006#p10006

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 04, 2016 4:58 pm 
Offline

Joined: Tue Aug 02, 2016 9:56 am
Posts: 40
Location: Amsterdam, The Netherlands
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

_________________
Gerben Vos
Developer


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 16, 2016 11:52 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group