Comments (8)
I've got a similar problem.
I use just a simple Script for testing, stored with win-1252 encoding:
COLUMN parameter FORMAT A20
COLUMN value FORMAT A20
SELECT * FROM V$NLS_PARAMETERS
WHERE parameter IN ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
SELECT USERENV('LANGUAGE') FROM dual;
SELECT 'ÄÖÜ-äöüß-€' AS umlaute FROM DUAL;
In oradewrc.json I have
"source.encoding": "win1252",
and in settings.json:
"files.encoding": "windows1252",
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": "/k chcp 1252",
"oradew.envVariables": {
"NLS_LANG": "GERMAN_GERMANY.WE8MSWIN1252"
}
When I Show NLS_LANG in Dos-Shell:
Z:\>echo %NLS_LANG%
AMERICAN_AMERICA.we8mswin1252
When I use sqlplus.exe in the vscode-Terminal, everything is fine:
What can I do?
from oradew-vscode.
Have you tried also setting chcp in the intermediate sql.bat file (cliExecutable) setting?
from oradew-vscode.
I also get the same error (????) and I use the following file.bat
chcp 1252
set NLS_LANG=.WE8MSWIN1252
sqlplus %*
the file.bat solves the problems of special characters when saving objects in the DB, but not when getting information from the DB.
I think it is related to the problem that I reported above concerning the import of objects from DB.
If the script (file.sql) is written with UTF8 encoding there are no problems. If I use Windows1252, it doesn't work.
from oradew-vscode.
It probably depends on how the task to launch the command is configured.
Take a look here:
Changing the encoding for a task output
from oradew-vscode.
The oradew task which subsequently runs sql
(cli) process is executed through processExecution
:
I believe that is the reason why
shellArgs
don't do the trick here and I am not sure if it is possible to pass chcp
to terminal used in processExecution
and how.
Maybe changing the default code page of the terminal could help:
https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8
from oradew-vscode.
Importing with "import selected object" is a different story as it save file on disk (not related to chcp). It should work with correctly setting property ("source.encoding": "win1252"
).
from oradew-vscode.
I do not recommend you to change the code page of the machine, it may stop the Windows operating system.
Thanks @mickeypearce, I hope that at least it works out for the objects imported from the DB.
from oradew-vscode.
@mickeypearce this is my oradewrc.json:
{
"compile.warnings": "NONE",
"compile.force": true,
"compile.stageFile": false,
"source.input": ["./Database/**/*.sql"],
"source.encoding": "win1250",
"source.pattern": {
"packageSpec": "./Database/{schema-name}/STOREDS/PKSPEC/{object-name}_h.sql",
"packageBody": "./Database/{schema-name}/STOREDS/PKBODY/{object-name}_b.sql",
"trigger": "./Database/{schema-name}/TRIGGERS/{object-name}.sql",
"typeSpec": "./Database/{schema-name}/TYPES/{object-name}.sql",
"typeBody": "./Database/{schema-name}/TYPE_BODIES/{object-name}.sql",
"view": "./Database/{schema-name}/VIEWS/{object-name}.sql",
"function": "./Database/{schema-name}/STOREDS/FUNC/{object-name}.sql",
"procedure": "./Database/{schema-name}/STOREDS/PROC/{object-name}.sql",
"table": "./Database/{schema-name}/TABS/{object-name}_tab.sql",
"synonym": "./Database/{schema-name}/SYNONYMS/{object-name}.sql",
"apex": "./Database/{schema-name}/APEX/{object-name}.sql"
},
"import.ease": true,
"import.getDdlFunction": "siu.utl_generate_oradew.getddl",
"package.input": ["./Database/**/*.sql", "./scripts/**/*.sql"],
"package.exclude": ["./scripts/**/+(file|run|test)*.sql"],
"package.output": "./pubblicazione/{schema-name}.sql",
"package.encoding": "win1250",
"package.templating": false,
"test.input": ["./test/**/*.test.sql"],
"version.number": "0.0.1",
"version.description": "Gestione DB",
"version.releaseDate": "2021-01-01"
}
putting "source.encoding": "win1252" the problem is solved. my mistake
from oradew-vscode.
Related Issues (20)
- Run as Script hangs for a few minutes HOT 3
- Windows econding UTF8 problem HOT 42
- Compile error "ERROR ORA-06550: line 3, column 40:" HOT 8
- problems importing packages from the DB HOT 3
- Terminal output problem matcher HOT 26
- Generate: "output" doesn't work
- Extension causes high cpu load HOT 1
- Displaying umlauts in terminal output
- Encoding problem in SQL-Statements HOT 3
- dbms_metadata.get_ddl does not work when used in UTL_GENERATE_ORADEW HOT 3
- Initialize Workspace not working HOT 8
- Oracle wallet authentication compatibility, userless & passwordless HOT 9
- Error while trying to retrieve text for error ORA-01804 HOT 5
- Drop support for sqlplus, sqlcl Liquibase ci/cd HOT 8
- Support latest version of node HOT 6
- Generating a source from a database HOT 5
- Create source from a non-DEV env
- Problem importing when object has "SQL" in the name HOT 1
- problems connecting to oracle database (proxy authentication) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oradew-vscode.