David E. Wheeler

Results 436 comments of David E. Wheeler

Tonight I properly noticed this bit from [the docs](https://metacpan.org/pod/DBD::Oracle#connect): > The connection string is always of the form: "dbi:Oracle:" There are several ways to identify a database: > > 1....

> Does DBD::Oracle support "Easy Connect Plus" syntax? That's what the docs say, and they show this example: ``` perl $dbh = DBI->connect("dbi:Oracle://myhost:1522/ORCL",'username', 'password'); ``` But I don't understand how...

We'd certainly welcome a patch to add it!

Hrm. That's [coming from the spool method](https://github.com/sqitchers/sqitch/blob/v1.4.0/lib/App/Sqitch.pm#L480), which spools output from the database CLI. Which RDBMS are you using? I wonder if it's not properly emitting UTF-8 for some reason.

Is your database using UTF-8 encoding? Check [client_encoding](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-CLIENT-ENCODING).

Sqitch requires everything to be UTF-8, and it sets up the Oracle connection for that: https://github.com/sqitchers/sqitch/blob/7edc5366f1c801ac9f97f9ec0157e5fbdce39aac/lib/App/Sqitch/Engine/oracle.pm#L20-L27 So be sure that the contents of the variable are UTF-8 and not CP1252.

I *think* the problem is not the text read from the command-line, but text returned from SQL*Plus. If it doesn't emit UTF-8 then Sqitch will have trouble reading it. Could...

Yes, the patch works because it's not decoding the output from SQL*Plus into UTF-8. Which means SQL*Plus is not emitting UTF-8. Clearly there's some additional configuration we need to make...

Sure seems like setting `NLS_LANG` [should work](https://unix.stackexchange.com/a/318045).

Yeah, Sqitch sets `NLS_LANG`, so anything you set it to doesn't work. Unless you tried setting it in the source? https://github.com/sqitchers/sqitch/blob/7edc5366f1c801ac9f97f9ec0157e5fbdce39aac/lib/App/Sqitch/Engine/oracle.pm#L20-L27