Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accentuation in Scrip (WIN1252) [DNET786] #724

Closed
firebird-issue-importer opened this issue Sep 20, 2017 · 8 comments
Closed

Accentuation in Scrip (WIN1252) [DNET786] #724

firebird-issue-importer opened this issue Sep 20, 2017 · 8 comments

Comments

@firebird-issue-importer

Submitted by: Workdev Tecnologia da Informação LTDA (workdev)

Attachments:
5100_000000.sql

Script.
CREATE EXCEPTION EXC_SM_CD_ES_PRODUTO 'Produto Não Cadastrado.';
CREATE EXCEPTION EXC_SM_CD_PARAMETROS 'Falha no Parâmetro.';
CREATE EXCEPTION EXC_SM_MV_CT_CB_CONTA_MO 'Movimentador Inválido para Esse tipo de Conta.';

Execute Script (.NET Data provider)

EXC_SM_CD_ES_PRODUTO 'Produto N?o Cadastrado.';
EXC_SM_CD_PARAMETROS 'Falha no Par?metro.';
EXC_SM_MV_CT_CB_CONTA_MO 'Movimentador Inv?lido para Esse tipo de Conta.';

Result.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Commented by: @cincuranet

Show the code you're using.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Commented by: Workdev Tecnologia da Informação LTDA (workdev)

Connection:

data source=localhost;initial catalog=C:\SAD_GESTOR\METHASM.FDB;user id=sysdba;password=masterkey;character set=WIN1252;dialect=3;port number=3050;role name=;connection lifetime=0;connection timeout=15;pooling=True;packet size=4096;server type=Default

Code:

FirebirdSql.Data.Isql.FbScript fbs = FirebirdSql.Data.Isql.FbScript.LoadFromFile(Path.GetTempPath() + "\\" + Program.ClsAmbiente.Sigla + "\\" + Program.ClsAmbiente.Sigla + "_000000.sql");
fbs.Parse();

                    FirebirdSql\.Data\.Isql\.FbBatchExecution fbe = new FirebirdSql\.Data\.Isql\.FbBatchExecution\(Conexao\);

                    new FirebirdSql\.Data\.Isql\.FbBatchExecution\(Conexao\);

                    fbe\.AppendSqlStatements\(fbs\);
                    fbe\.Execute\(true\);
@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Commented by: @cincuranet

What's the encoding of the file? Or better, share it here.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Commented by: Workdev Tecnologia da Informação LTDA (workdev)

Database:

SET SQL DIALECT 3;

SET NAMES WIN1252;

PAGE_SIZE 8192
DEFAULT CHARACTER SET WIN1252 COLLATION WIN1252;

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Modified by: Workdev Tecnologia da Informação LTDA (workdev)

Attachment: 5100_000000.sql [ 13180 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Commented by: @cincuranet

Your script is WIN1252. You need to load it manually with encoding or change it to UTF8, as that's the default encoding for LoadFromFile/ReadAllText.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 20, 2017

Modified by: @cincuranet

status: In Progress [ 3 ] => Closed [ 6 ]

resolution: Won't Fix [ 2 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants