scrapinghub / js2xml

Convert Javascript code to an XML document
MIT License
186 stars 23 forks source link

Fix unicode surrogate pair handling #30

Closed immerrr closed 6 years ago

immerrr commented 6 years ago

Python uses UTF-8 by default which doesn't like surrogate pairs. This PR attempts to replace surrogate pairs in the input strings by their pure-unicode counterparts.

codecov[bot] commented 6 years ago

Codecov Report

Merging #30 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   87.82%   87.88%   +0.06%     
==========================================
  Files          11       11              
  Lines         739      743       +4     
==========================================
+ Hits          649      653       +4     
  Misses         90       90
Impacted Files Coverage Δ
js2xml/xmlvisitor.py 96.76% <100%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2ff0b3b...f3cea7c. Read the comment docs.

immerrr commented 6 years ago

Thank you @dangra ! You're the best!