Skip to content

Commit

Permalink
Editing encoding preferences topic
Browse files Browse the repository at this point in the history
  • Loading branch information
mbakeranalecta committed Aug 18, 2014
1 parent 5351674 commit 678e324
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 37 deletions.
3 changes: 2 additions & 1 deletion DITA/chapter.configure-application.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<topicref href="topics/preferences-plugins.dita" collection-type="sequence"/>
<topicref href="topics/preferences-external-tools.dita" collection-type="sequence"/>
<topicref href="topics/preferences-menu-shortcut-keys.dita" collection-type="sequence"/>
<topicref href="topics/preferences-file-types.dita" collection-type="sequence"/>
<topicref href="topics/preferences-file-types.dita" collection-type="sequence"
keys="file-types-preferences"/>
<topicref href="topics/preferences-open-find-resources.dita" collection-type="sequence"/>
<topicref href="topics/preferences-custom-editor-variables.dita" collection-type="sequence"/>
<mapref href="section.preferences.network-connection.ditamap" format="ditamap"/>
Expand Down
7 changes: 3 additions & 4 deletions DITA/tasks/syntax-highlight-not-available-Eclipse-plugin.dita
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
Why does an <filepath>.ext</filepath> file opened with the <ph
keyref="product"/> plugin not
have syntax highlight?</p>
<p>Associating an extension with <ph
keyref="product"/> in Eclipse <ph
keyref="currentSupportedEclipseVersion"
/>+ requires three steps:</p>
<p>Associating an extension with <ph keyref="product"/> in Eclipse
<?oxy_comment_start author="Mark" timestamp="20140818T103630-0400" comment="The fact that there is a plus sign after the keyref here suggests that this should not be the current version, but the earliest version for which this applies. That is, it should maybe say &quot;for all versions of Eclipese since x.y&quot;. Can you confirm?"?><ph
keyref="currentSupportedEclipseVersion"/>+<?oxy_comment_end?> requires three steps:</p>
</context>
<steps>
<step>
Expand Down
49 changes: 30 additions & 19 deletions DITA/topics/preferences-encoding.dita
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,50 @@
</menucascade>. The following encoding preferences are available:</p>
<ul>
<li product="author developer editor svnClient"><uicontrol>Encoding for non XML
files</uicontrol> - specifies the default encoding the <ph keyref="product"/> uses to open
non XML documents. This is necessary because non XML files have a large variety of formats
and there is no standard mechanism for declaring the encoding that should be used for
opening and saving the file. In case of XML files, the encoding is declared at the beginning
of the file in a special declaration element or it is assumed to be the default value, which
is UTF-8;</li>
<li product="editor author developer"><uicontrol>UTF-8 BOM handling</uicontrol> - specifies
how to handle the <term>Byte Order Mark</term> (BOM) when <ph keyref="product"/> saves an
UTF-8 XML document: <ul>
files</uicontrol> -
<?oxy_comment_start author="Mark" timestamp="20140818T110557-0400" comment="JSON has a default encoding (UTF-8) and a method for detecting alternate encodings. Presumably Oxygen recognizes this and does not use this setting when reading and writing JSON files? Python (for which Oxygen has an editor, also has a default and a convention for specifying alternate encodings. It should be made clear in the text (and in the interface) whether these conventions are supported or ignored. "?>This
setting specifies the default character encoding used to open non-XML
documents.<?oxy_comment_end?> More precisely, this is the encoding used for files opened in
editors other than the XML editor. The file types opened by each editor are specified in
<xref keyref="file-types-preferences"/>. For XML files, the default encoding is UTF-8, and
other encodings must be declared explicitly in the XML declaration (for example
<codeph>&lt;?xml version="1.0" encoding="UTF-16<b>"</b>?&gt;</codeph>). Most other text
formats do not have a default character encoding, nor a standard method of indicating the
character encoding.
<?oxy_comment_start author="Mark" timestamp="20140818T110959-0400" comment="Does Oxygen attempt to do any kind of encoding detection, or does it just default to this setting?"?>This
option sets which encoding will be used for reading and writing these
files.<?oxy_comment_end?>
</li>
<li product="editor author developer"><uicontrol>UTF-8 BOM handling</uicontrol> - This setting
specifies how to handle the <term>Byte Order Mark</term> (BOM) when <ph keyref="product"/>
saves a UTF-8 XML document: <ul>
<li><uicontrol>Don't Write</uicontrol> - do not save the BOM bytes. Loaded BOM bytes are
ignored;</li>
<li><uicontrol>Write</uicontrol> - save the BOM bytes;</li>
ignored.</li>
<li><uicontrol>Write</uicontrol> - save the BOM bytes.</li>
<li><uicontrol>Keep</uicontrol> - do not alter the BOM declaration of the currently open
file. This is the default option.</li>
</ul><note>The UTF-16 BOM is always preserved. UTF-32 documents have a
<term>big-endian</term> byte order.</note></li>
<li product="author developer editor svnClient"><uicontrol>Encoding errors
handling</uicontrol> - defines how to handle characters that cannot be represented in the
specified encoding of the document when the document is opened. The available options are:<ul>
<li><uicontrol>REPORT</uicontrol> - displays an error dialog box with the character that
handling</uicontrol> - This setting specifies how to handle characters that cannot be
represented in the
<?oxy_comment_start author="Mark" timestamp="20140818T111314-0400" comment="Does this meant the encoding specified by the non XML document encoding setting on this prefernences page?"?>specified
encoding of a document<?oxy_comment_end?> when the document is opened. The available options are:<ul>
<li><uicontrol>REPORT</uicontrol> - displays an error identifying the character that
cannot be represented in the specified encoding. Unrecognized characters are rendered as
an empty box. This is the default option;</li>
<li><uicontrol>IGNORE</uicontrol> - the character is ignored and it is not included in the
document displayed in the editor panel;<note type="attention">If you edit and save the
an empty box. This is the default option.</li>
<li><uicontrol>IGNORE</uicontrol> - the error is ignored and the character is not included
in the document displayed in the editor.<note type="attention">If you edit and save the
document, the characters that cannot be represented in the specified encoding are
dropped.</note></li>
<li><uicontrol>REPLACE</uicontrol> - replace the character with a standard replacement
<li><uicontrol>REPLACE</uicontrol> - the character is replaced with a standard replacement
character. For example, if the encoding is UTF-8, the replacement character has the
Unicode code <codeph>FFFD</codeph>, and if the encoding is ASCII, the replacement
character code is 63.</li>
</ul></li>
</ul>
<?oxy_comment_start author="Mark" timestamp="20140818T112109-0400" comment="Another exception, like JSON. We need a more formal statement concerning what character encodings are recognized for what file types. "?>
<note product="author developer editor">The default encoding for RNC files is considered
UTF-8.</note>
UTF-8.<?oxy_comment_end?></note>
</body>
</topic>
21 changes: 8 additions & 13 deletions DITA/topics/preferences-file-types.dita
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@
<li><uicontrol>Extension</uicontrol> - The extensions of the files that will be
associated with an editor type.</li>
<li><uicontrol>Editor</uicontrol> - The type of editor which the extensions will be
associated with. Some editors provide easy access to frequent operations via
toolbars (e.g. XML editor, XSL editor, DTD editor) while others provide just a
syntax highlight scheme (e.g. Java editor, SQL editor, Shell editor, etc.).<p>If the
editor set here is not one of the XML editors (XML editor, XSL editor, XSD
editor, RNG editor, WSDL editor) then the encoding set in <xref
href="preferences-encoding.dita">the preference <uicontrol>Encoding for non
XML files</uicontrol>
</xref> is used for opening and saving a file of this type. This is necessary
because in case of XML files the encoding is usually declared at the beginning
of the XML file in a special declaration or it assumes the default value UTF-8
but in case of non XML files there is no standard mechanism for declaring the
encoding of the file.</p></li>
associated with. Some editors provide easy access to frequent operations via toolbars (e.g.
XML editor, XSL editor, DTD editor) while others provide just a syntax highlight scheme
(e.g. Java editor, SQL editor, Shell editor, etc.).<p>If the editor set here is not one of
the XML editors (XML editor, XSL editor, XSD editor, RNG editor, WSDL editor) then the
encoding set in <xref href="preferences-encoding.dita">the preference <uicontrol>Encoding
for non XML files</uicontrol>
</xref> is used for opening and saving a file of this type. </p></li>
</ul>
<p product="editor author">You can also decide the files which will be handled as DITA maps
when opened in <ph keyref="product"/>. If
Expand All @@ -62,4 +57,4 @@
Files</uicontrol>, <uicontrol>Check Spelling in Files</uicontrol>,
<uicontrol>Validate</uicontrol>.</p>
</body>
</topic>
</topic>

0 comments on commit 678e324

Please sign in to comment.