× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
NielsGron reported 2016-01-26T00:41:14Z  · tomconrad last modified 2018-03-29T14:19:03Z

FluidShell source command doesn't handle specific control characters which prevent importing data


customer request PM
Dev
Fun Fun
funfun
QA
Tariq Rahiman
tariqrahiman
Priority Low
Complexity Unknown
Component App - FluidShell - Command
Version Future

Below is an SQL script for SQL Server.  It will create a table with a nvarchar column and insert a row with a control character of NCHAR(0x81).

In FluidShell I then try to export the table and data to a file with INSERT statements and then import it back by running it through the source command.  I use the following commands :

sqlexport --output-file savedfile.txt --format 'INSERT' -II true -OQ 'square-bracket' --charset 'UTF-8' ControlNiels
source --charset 'UTF-8' savedfile.txt

The error message I get is :

source: savedfile.txt: Script error on line 2:
Command line contains control character(s) which is not allowed.

I've attached a screenshot illustrating the issue.

The exception is thrown by CommandLineInterpreter.java line 1352.  It also references issues #7098 & #7224.

The original issue was #7009.  The TerminalControlChar.java file specifically filters the characters with :

    public static boolean isControlChar(int code) {
        return (isC0Set(code) || isC1Set(code));
    }

    public static boolean isC0Set(int code) {
        // C0 set is 00-1F (in hex)
        return isInRange(code, 0x00, 0x1F);
    }

    public static boolean isC1Set(int code) {
        // C1 set is 80-9F (in hex)
        return isInRange(code, 0x80, 0x9F);
    }
 

========= SQL Script ===========

drop table [dbo].[ControlNiels]
go
CREATE TABLE [dbo].[ControlNiels]  (
    [ControlId]      int NOT NULL,
    [Company]         nvarchar(80) NULL,
    CONSTRAINT [PK_ControlNiels] PRIMARY KEY CLUSTERED([ControlId])
)
go
INSERT INTO [Chinook].[dbo].[ControlNiels]([ControlId], [Company])
VALUES(1, N'AquaFold' +  NCHAR(0x81))
GO
select * from ControlNiels

1 attachment

Issue #14236

New
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017