Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6 KiB

commit 86ff00b49004091a95933167824088f7682ee698
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Fri Jul 31 00:18:32 2020 +0100
SnapGene: Parse XML data as UTF8-encoded strings (#3180).
All XML chunks within SnapGene packets should be parsed as UTF-8,
as per the XML specification in the absence of an explicit encoding
attribute.
diff --git a/Bio/SeqIO/SnapGeneIO.py b/Bio/SeqIO/SnapGeneIO.py
index 9c8598b50..9464e682f 100644
--- a/Bio/SeqIO/SnapGeneIO.py
+++ b/Bio/SeqIO/SnapGeneIO.py
@@ -75,7 +75,7 @@ def _parse_notes_packet(length, data, record):
This type of packet contains some metadata about the sequence. They
are stored as a XML string with a 'Notes' root node.
"""
- xml = parseString(data.decode("ASCII"))
+ xml = parseString(data.decode("UTF-8"))
type = _get_child_value(xml, "Type")
if type == "Synthetic":
record.annotations["data_file_division"] = "SYN"
@@ -116,7 +116,7 @@ def _parse_features_packet(length, data, record):
which are in a dedicated Primers packet). The data is a XML string
starting with a 'Features' root node.
"""
- xml = parseString(data.decode("ASCII"))
+ xml = parseString(data.decode("UTF-8"))
for feature in xml.getElementsByTagName("Feature"):
quals = {}
@@ -170,7 +170,7 @@ def _parse_primers_packet(length, data, record):
stores primer binding features. The data is a XML string starting
with a 'Primers' root node.
"""
- xml = parseString(data.decode("ASCII"))
+ xml = parseString(data.decode("UTF-8"))
for primer in xml.getElementsByTagName("Primer"):
quals = {}