Home > Back-end >  Java background receive access WeChat nicknames, nickname contains small icon saved to a database er
Java background receive access WeChat nicknames, nickname contains small icon saved to a database er

Time:09-20



Above is saved to the database, the database directly out of the anomaly,
Then I said according to the online database field is modified to utf8mb4

Here is to change the database encoding after



Then get expression nickname saved to the database will appear the same mistake

CodePudding user response:

You have to save the field coding into utf8mb4 nickname?

CodePudding user response:

This case make a mistake, and then do not put the icon is saved to the database directly, should be done before saving base64 transcoding,
New String (Base64. GetEncoder (.) encode (STR) getBytes ()), "utf-8"); Time to take out and then decode, and this can prevent the database error

CodePudding user response:

Don't know what is it you want to deposit, this is my access to public information to the database, fan head straight path is as follows:

CodePudding user response:

If the file is very small, can be converted into base64 save to the database, data suggest or relative path file storage of inventory, real files stored on the hard disk

CodePudding user response:

reference 5 floor qq_43396436 reply:
don't know what is it you want to deposit, this is my access to public information to the database, fan head straight path is as follows:



Boss: why did you set the, I met this problem
  • Related