Unicode conversion fails
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, nodejs
- 領域
- database
調査の方向性
報告されている macOS、unixODBC、SQL Server のセットアップを使用し、Node.js 接続経由で Unicode の挿入を再現してから、その ODBC デバッグエンコーディング行を isql の結果と比較します。node-odbc 経由で Ω を挿入したときに文字が保持されれば、Issue は解決です。報告にはソースファイルもテストも特定されていません。
索引モデルが issue の本文から書いたものです。
説明
Hi,
The test environment setup:
- MacOS Ventura
- unixODBC driver manager version 2.3.11
- Microsoft ODBC Driver 18 For SQL Server
- SQLServer running in Docker (or on a Windows machine)
Database has a single table:
create` table test (col1 `nvarchar(100));
Tested connection to the database with isql (command line tool) and issued the following statement:
insert into test (col1) values (N'Ω');
- result is OK
Tested connection with nodejs and issued the same statement as above on the connection:
const statement = `insert into IR_TSTGIN.dbo.test (col1) values (N'Ω');`
const result = await connection.query(statement);
- Statement is executed but the result is not OK. The omega charactered is converted to another symbol.
Ran both statements above (via isql and with nodejs) with odbc debug enabled.
- running with isql the log contains a message:
[ODBC][47379][1679320146.155152][SQLAllocHandle.c][395]
Entry:
Handle Type = 2
Input Handle = 0x7f987c815200
UNICODE Using encoding ASCII 'UTF-8' and UNICODE 'UCS-2-INTERNAL'
- running through nodejs the log contains the following message:
[ODBC][46268][1679319075.820124][SQLAllocHandle.c][395]
Entry:
Handle Type = 2
Input Handle = 0x7f8a88012600
UNICODE Using encoding ASCII 'US-ASCII' and UNICODE 'UCS-2-INTERNAL'
It seems that the locale settings are not applied when connecting via NodeJS odbc to the driverManager.
The locale settings are:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
- 主要言語
- JavaScript
- スター
- 159
- フォーク
- 92
- 平均マージ
- 5時間 59分
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IBM/node-odbc のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
security
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
[Bug] Sybase ASE: Encoding issue (works in msnodesqlv8, fails in node-odbc with \x1A artifacts)オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
naver/egjs-flicking#971 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
RADAR-base/radar-self-enrolment-ui#118 ·
メンテナーはふだん 1 日以内に返信
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MicrosoftDocs/edge-developer#3970 ·
メンテナーはふだん 1 日以内に返信
-
agent/scanner hive/hosted-available-lke648397-260827-5n31 quality testing
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信