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

Garbled error message in debug log #31

Open
moriyama opened this issue Feb 27, 2023 · 0 comments
Open

Garbled error message in debug log #31

moriyama opened this issue Feb 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@moriyama
Copy link

CCOBOL source code pre-compiled with the ocesql command of Open Cobol ESQL for the COBOL to C translator will produce an error at runtime when compiled using the cobj command of opensource COBOL 4J which is a COBOL to Java transrator.

At this time, if you set "debug" in the OCDB_LOGLEVEL environment variable, the log will be output to the /tmp/ocesql.log file, but the error message is garbled.

Steps to Reproduce:

  1. Install PostgreSQL Server and create testdb database.
  2. Pre-compile the sample INSERTTBL.cbl using ocesql command of Open Cobol ESQL for the COBOL to C translator.
  3. Compile the pre-compiled COBOL source code using the cobj command of opensource COBOL 4J which is a COBOL to Java transrator.
  4. Set the LANG environment variable to ja_JP.UTF-8.
  5. Set the OCDB_LOGLEVEL environment variable to "debug".
  6. Run INSERTTBL.

Actual results:

Garbled error messages in /tmp/ocesql.log.

/tmp/ocesql.log:

...snip...
CONNADDR Some(org.postgresql.jdbc.PgConnection@2438dcd), EXEC SQL COMMIT
MESSAGE:[B@29a5f4e7
-9999:08006:[B@29a5f4e7
...snip...

Expected results:

Error messages are output to /tmp/ocesql.log in Japanese with UTF-8 encoding.

/tmp/ocesql.log:

...snip...
CONNADDR Some(org.postgresql.jdbc.PgConnection@5167f57d), EXEC SQL COMMIT
MESSAGE:バックエンドへの送信中に、入出力エラーが起こりました。
-9999:08006:バックエンドへの送信中に、入出力エラーが起こりました。
...snip...
@yutaro-sakamoto yutaro-sakamoto self-assigned this May 1, 2024
@yutaro-sakamoto yutaro-sakamoto added the bug Something isn't working label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants