mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
Use current encoding for the binary check and being able to reset encoding
The current table encoding is used in the binary check, so text encoded in 8-bit encodings is properly recognised as text in the table widget. Make it possible to reset the encoding used in the way suggested to the user: "Leave the field empty for using the database encoding". Currently it was rejecting it with the message: "This encoding is either not valid or not supported." See issue #1279
This commit is contained in:
@@ -2542,7 +2542,7 @@ void MainWindow::browseDataSetTableEncoding(bool forAllTables)
|
||||
if(ok)
|
||||
{
|
||||
// Check if encoding is valid
|
||||
if(!QTextCodec::codecForName(encoding.toUtf8()))
|
||||
if(!encoding.isEmpty() && !QTextCodec::codecForName(encoding.toUtf8()))
|
||||
{
|
||||
QMessageBox::warning(this, qApp->applicationName(), tr("This encoding is either not valid or not supported."));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user