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

Normalizing serialized data for BOM characters #689

Merged
merged 3 commits into from
Dec 16, 2022
Merged

Normalizing serialized data for BOM characters #689

merged 3 commits into from
Dec 16, 2022

Commits on Dec 15, 2022

  1. Normalizing serialized data for BOM characters

    Prior to this commit, when someone would upload a CSV it might have a
    column name that included the tricksy, invisibile [Byte Order Mark][1].
    The manifestation was that you could look at the raw metadata and see a
    key called `"file"` however when checking `raw_metadata.key?("file")`
    the result was `false`.
    
    To find this `entry.raw_metadata.keys.first.chars.map(&:chr)` I got
    `["", "f", "i", "l", "e"]` where the first value of that array was a
    [Byte Oder Mark][1].
    
    With this commit, we're handling both how we persist and how we load
    persisted serialized data.  This follows on the documentation for the
    `ActiveRecord::Base.serialize` method.
    
    It's envisioned that we might have more characters to sanitize.
    
    Closes: #688
    Related to: scientist-softserv/adventist-dl#179
    
    [1]: https://en.wikipedia.org/wiki/Byte_order_mark
    jeremyf committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    8a4e86d View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2022

  1. Amending documentation

    jeremyf committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    d851635 View commit details
    Browse the repository at this point in the history
  2. Appeasing the cop

    jeremyf committed Dec 16, 2022
    Configuration menu
    Copy the full SHA
    857ee0f View commit details
    Browse the repository at this point in the history