Server AL32UTF8 / Client VN8MSWIN1258 won't work?
399766Sep 22 2004 — edited Sep 28 2004I'm working on Windows XP ServicePack2. The language is Vietnamese.
This is my registry settings:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ACP = 1258;
NLS_LANG set to VIETNAMESE_VIETNAM.VN8MSWIN1258;
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME1\SQLPLUS_FONT = Courier New;
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME1\SQLPLUS_FONT_CHARSET = VIETNAMESE;
The database NLS_CHARACTERSET is AL32UTF8
When I start SQLPlus, it shows:
----------
SQL*Plus: Release 9.2.0.1.0 - Production on ThứTư Tháng ChÃn 22 13:28:59 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
----------
Look at the underlined text, it is the date of today in Vietnamese. Show far, so good.
But when I query some Vietnamese text from a varchar column, some Vietnamese charater is missing (replaced with '?').
Still in SQLPlus, when I insert a Vietnamese text ('Tiếng Viá»t') into a varchar field, then query the text and its length back, the text displayed fine. But the length of the text is 12! It should be 10, and I think that it shows 12 because the text in the database store the 2 accents (acute accent in 'Tiếng', about the 'ê' and dot accent in 'Viá»t', under the 'ê') is stored as two character, which is right in WINMS1258 code page. That means the Oracle database did no conversion with the text I inserted from SQLPlus. I think the Globalization means the Database would convert the text from NLS_LANG (VN8MSWIN1258 in this case) into the database character set (AL32UTF8 in this case) and vise-versa, but it didn't.
Somebody please explain to me why?