Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Investigate ODBC compatibility mode via environment variable

オープン
#660 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
cli

調査の方向性

まず PR #638 と、go-sqlcmd と ODBC sqlcmd の違いとして挙げられている項目を確認します。コードページの処理、出力、エラー、終了コード、変数展開、NULL、列幅を比較し、その後、どの動作を設定可能にできるかを判断します。完了には、互換性設計の文書化、実装範囲の定義、テスト、ドキュメントの更新が必要です。

索引モデルが issue の本文から書いたものです。

説明

Summary

Investigate adding an environment variable (e.g., SQLCMD_ODBC_COMPAT=1) that would make go-sqlcmd behave exactly like the original ODBC sqlcmd for maximum backward compatibility.

Motivation

go-sqlcmd has intentionally diverged from ODBC sqlcmd in several areas to provide better defaults for modern usage. However, users migrating existing scripts or workflows may need exact behavioral compatibility with the original tool.

Potential Scope

When the compatibility mode is enabled, go-sqlcmd would match ODBC sqlcmd behavior in areas including:

Codepage Handling (PR #638)
Behavior go-sqlcmd (current) ODBC sqlcmd Compat mode
Default encoding UTF-8 Windows ANSI (system locale) ANSI
UTF-16 codepages (1200, 1201) Not supported Supported Supported
BOM detection Automatic Automatic Automatic
Other Potential Areas (to investigate)
  • Output formatting differences
  • Error message formatting
  • Exit code behavior
  • Variable expansion edge cases
  • Null handling in output
  • Column width calculations

Implementation Options

  1. Single env var: SQLCMD_ODBC_COMPAT=1 enables all compatibility behaviors
  2. Granular env vars: SQLCMD_CODEPAGE_COMPAT=1, SQLCMD_OUTPUT_COMPAT=1, etc.
  3. Command-line flag: --odbc-compat or -y (if available)

Tasks

  • Document all known behavioral differences between go-sqlcmd and ODBC sqlcmd
  • Evaluate which differences can reasonably be made configurable
  • Design the compatibility mode API (env var name, granularity)
  • Implement compatibility mode for codepage handling
  • Add tests for compatibility mode behavior
  • Update documentation

Related

  • PR #638: Add -f codepage flag for input/output encoding
  • This issue originated from codepage investigation showing ODBC uses ANSI default vs go-sqlcmd's UTF-8 default

Labels

enhancement, documentation

主要言語
Go
スター
595
フォーク
91
平均マージ
9時間 35分
マージ済み PR(30日)
1

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/go-sqlcmd のほかの issue

microsoft/go-sqlcmd の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。