Open swift2512 opened 2 months ago
Well what makes less sense there is that the GUI tool just calls the cli tool, so it doesn't really have opinions about encoding.
When you do the gui restore, do you see any options (checkboxes)? We recently added a “clean” option where we do some regexes which could potentially be mangling the Unicode.
Yes, there's this checkbox for database cleaning. I checked that.
Leaving this unchecked restores backup with correct characters. If checked- garbage characters everywhere.
I have exactly the same problem. In my case it is a problem with Polish letters but now when I add new records containing Polish characters it is OK. The problem is only with the imported data.
I assume there is a problem with the export, then the encoding is lost.
I have exactly the same problem. In my case it is a problem with Polish letters but now when I add new records containing Polish characters it is OK. The problem is only with the imported data.
I assume there is a problem with the export, then the encoding is lost.
Exported backup is ok, it has correct encoding information and characters. Backup restore only fails when "Clean backed-up database before restore' is checked. Then this is unchecked or restore through ssh is done, are letters are correct.
While dbdumb file is using utf8 format, looks like data parser uses ANSI when reading this file and then forwards these wrongly decoded characters to the database.
You generally don't need to clean the database unless you've uploaded it from somewhere else. What we were finding is that restores would break, if for example you were running as a mysql user with special grants on one server, but the new server doesn't have those grants. The process would basically be that the tables get dropped and then the import fails because the mysql user on the current system didn't have enough rights granted (or sometimes there were settings included in the export from one machine that the new machine can't handle.)
Thanks for helping us pin this down, @swift2512 - we'll get it sorted shortly.
Debug mode
Describe the bug
When restoring backup (generated in 'Admin > Backups', lithuanian letters are encoded incorrectly. Instead of ĄČĘĖĮŠŲŪŽ i get something like ĄČĘĖĮŠŲŪŽ This doesn't happen when restoring same backup file through SSH (php artisan snipeit:restore /var/www/snipeit/storage/app/backups/snipe-it-2024-08-26-15-42-46.zip) Can't figure out what's wrong. Tried Edge and Firefox browsers for backup restore - same result.
Reproduction steps
Expected behavior
Characters encoded correctly.
Screenshots
Snipe-IT Version
Version v7.0.11 - build 15044 (master)
Operating System
ubuntu
Web Server
apache
PHP Version
8.3
Operating System
Windows 11
Browser
Edge, Firefox
Version
Latest
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
No