question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`text` fields are occasionally corrupted

See original GitHub issue

I’m storing JSON in a text column in my MySQL database. Occasionally, this JSON is corrupted during the insert, and seems to truncate to only a few characters. This has happened to 4 records out of 576.

Any ideas what might be causing this?

screenshot 2015-07-22 17 16 17

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
janmeiercommented, Jul 22, 2015

Perhaps try setting the charset in your connection options, passed to node-mysql

new Sequelize(..., {
  dialectOptions: {
    charset: 'utf8mb4'
  }
});
0reactions
janmeiercommented, Jul 22, 2015

Hmm, utf8mb4 should be able to store all chars though … 😄

There’s no magic way to deal with it now, but hopefully there will be soon, once I get the rewrite of data-types done. That would allow you to create a custom stringify function for text that could convert the text to another encoding befeore inserting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Corrupted Character Encoding (Corrupted Text) in ...
Go to "File" -> "Options" -> "Advanced" and scroll down until the "General" section is reached. In the "General" section, check the box...
Read more >
Text Disappears or is Corrupted in Start Menu and Settings ...
Text Disappears or is Corrupted in Start Menu and Settings Windows ; 1. Press ; Windows key + X, click ; Command Prompt...
Read more >
MS Word: "Update all fields" seems to be corrupting fields in ...
This makes me afraid to "update all fields" at all, even though I need my internal references to be coherent. This is an...
Read more >
Text box becomes corrupted after editing (SOLVED)
Quite difficult to reproduce, it occurs randomly. I encounter this kind of error when editing bold and justified text.
Read more >
Occasional CSS Google font corruption? - Stack Overflow
I am sometimes encountering font corruptions as shown in the image below, ... Both corrupted and non-corrupted text can be reproduced ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found