Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it explicit that a BufferedWriter can be passed in. #203

Merged
merged 1 commit into from Jun 3, 2016

Conversation

johnmay
Copy link
Member

@johnmay johnmay commented Jun 2, 2016

No description provided.

*/
public SDFWriter(OutputStream output) {
this(new OutputStreamWriter(output));
this(new OutputStreamWriter(output, StandardCharsets.UTF_8));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmm... why not go for ASCII or ISO-8859-1 or so? I know that's outdated, but this is the MDL formats we're talking about... not sure how many cheminf tool out there support UTF-8... just something to think about... I checked the 2005 ctfile.pdf and it does not seem to depend a certain char set...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously it was system dependant! Since all cheminf formats are ASCII and thus a subset of UTF-8 it only matters for aux fields like a title. e.g. 'Benzene Kékule Form' will now be correctly written on all systems.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UTF-8 has two-byte chars, not? And ASCII one-byte chars... that matters for programs which does not have "String" support that automatically handles that right...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, UTF-16 has two+ byte chars, UTF-8 is one+.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, than it should not cause problems...

@egonw
Copy link
Member

egonw commented Jun 3, 2016

I left two comments, but will apply anyway... they're more thoughts that reviewer requests :)

@egonw egonw merged commit cf70611 into master Jun 3, 2016
@johnmay johnmay deleted the patch/sdfwriteinit branch June 5, 2016 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants