On Oct 23, 1:09*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Quote:
FYI, The user has since tried the first insert statement (the one with
Chinese character) in C# with *'Ingres .NET Data Provider 2.0', and in
Java with 'Ingres JDBC Driver'. Neither of them works, the Chinese
character was stored as a '?' in both cases. |
I'm probably missing something, is this in relation to a previous
post? I'm just trying to understand the context. The following is a
bit of a brain dump on possible things to check. Apologies for the
bombardment of TLAs [http://en.wikipedia.org/wiki/Three-
letter_acronym] below :-) but the terminology is important with
multilingual "stuff".
When dealing with non-ASCII data, i.e. anything that is NOT 7bit ascii
(one often sees people claiming that things like the Euro symbol are
ASCII as they fit in a single byte encoding like cp1252 or iso
8859-15) you need to be clear on the storage and encoding.
For Chinese you have MANY options available to you.
* The traditional (read "really old way but still popular") is some
form of multi-byte encoding, of which they are many. E.g. BIG5, gbk,
etc...... this encoding would be stored in a varchar column.
* The modern (read "my recommendation") is some form of Unicode, again
there are a few sub-options to pick :-( E.g. utf8 is popular and
_sometimes_ makes sense, other options are UTF16 (or UCS2, for glyphs
in the BMP [http://en.wikipedia.org/wiki/
Mapping_of_Unicode_character_planes] , you may assume UCS2 and UTF16
are the same thing but only when dealing with the BMP!). In Ingres
UTF16 requires the NVARCHAR column type. You can use utf8 with varchar
but I'd encourage you to use UTF16.
So, Marty, what is your Chinese user using? .NET and JDBC imply
Unicode strings but one needs to check the destination type. My guess
is varchar with an II_CHARSETxx setting of something that is no
Chinese.
Please note that in my limited experience with Eclipse, I've not found
it to have great flexibility in choosing the approach you use. E.g.
The last time I used Eclipse it could not handle files with BOMs
[http://en.wikipedia.org/wiki/Byte-order_mark] and one could not
specify an encoding for "text" files.
Hope this helps get you started. If you've not already read
http://www.joelonsoftware.com/articles/Unicode.html it is a great
starting point (or reminder if you are already started) on dealing
with real world multi language data.
Chris