|
From: bill l. <cbi...@gm...> - 2007-09-17 14:48:18
|
I have no problem in writing and reading Chinese characters using odbc api so that I guess it should be OK for Japanese. Did you forget to declare the table column utf8 or fss in create table ddl? Vinay Setty wrote: > Kjell and others, > I am using Firebird ODBC driver (2.0.0.136) to connect to Firebird > database server 1.5.2 on a Windows XP SP2 Japanese machine. > > My connection string looks similar to this with no charset specified > Driver=Firebird/InterBase(r) > driver;Uid=SYSDBA;Pwd=masterkey;DbName=D:\FIREBIRD\examples\TEST.FDB; > > I am writing some Japanese strings represented in UTF8 format to the database > table column of type varchar (with no charset specified) and when I read it > back using select query I can see that the string is corrupt. > > P.S: I am doing DB operations from a C++ application using standard win32 > windows SQL APIs like SQLDriverConnect, SQLExecute etc. > > My string is as below > > Before writing to DB > UniCode: RunListからのコンテンツ作成に失敗しました... > UTF8: RunListã‹ã‚‰ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„作æˆã«å¤±æ•—ã—ã¾ã—ãŸ... > > After corruption > UniCode: RunListからのコンチEチEEに失敗しました... > UTF8: RunListã‹ã‚‰ã®ã‚³ãƒ³ãƒEƒ³ãƒE½œæEã«å¤±æ•—ã—ã¾ã—ãŸ... > > Do you suggest anything? > > Thanks and regards, > Vinay > > -----Original Message----- > From: fir...@li... > [mailto:fir...@li...] On Behalf Of Kjell > Rilbe > Sent: Monday, September 17, 2007 5:09 PM > To: fir...@li... > Subject: Re: [Firebird-odbc-devel] Charset and dialect in DSN > > Jorge, > > From the SQL Server ODBC driver help: > > ------------------------------- > Perform translation for character data check box > > When selected, the SQL Server ODBC driver converts ANSI strings sent > between the client computer and SQL Server by using Unicode. The SQL > Server ODBC driver sometimes converts between the SQL Server code page > and Unicode on the client computer. This requires that the code page > used by SQL Server be one of the code pages available on the client > computer. > > When cleared, no translation of extended characters in ANSI character > strings is done when they are sent between the client application and > the server. If the client computer is using an ANSI code page (ACP) > different from the SQL Server code page, extended characters in ANSI > character strings may be misinterpreted. If the client computer is using > the same code page for its ACP that SQL Server is using, the extended > characters are interpreted correctly. > ------------------------------- > > I suppose either option might work in most cases, but doesn't it sound > like the usual "I don't really know what this MS software is doing, but > I hope it works"? Firebird gives you full control. Is that bad? > > Kjell > > Jorge Andres Brugger wrote: > >> I have SQL Server and MySQL ODBC DSN here, and none of them asks for >> charsets (being dialect IB/FB exclusive). -- regards, bill |