Recent

Author Topic: A letter to the Team--from Chinese user  (Read 7009 times)

Goodman H__

  • Full Member
  • ***
  • Posts: 130
A letter to the Team--from Chinese user
« on: July 14, 2011, 02:35:33 am »
Dear the Team,

I am writing to request a basic feature of FP+lazaurs.In the eary and middle of last century,Delphi is the main (vast majority market %  ) development language in IT industry field in China.Even today Delphi fans in the forums here and there are still missing the Delphi ages and most of them still definitely agree Delphi is the most proper tool.But Delphi has its issue.
It was really a very excited moment when we found Lazarus.Yes,that is it.But when we decide to go further,we met the problem,a very specific problem that English native users/contries does not need to meet--Unicode support,or to be exact,Chinese character support in lazaurs.Well 99% of the IDE can provide proper function to us,some tiny issues which we can just bear it.But without ODBC,we are limited to a narrow field under Windows environment.

Yes.Our problem is the Chinese character support issue in TODBC series.We can live with English form/interfaces,We can live with English menus,helps,buttons,we can live in programming graphics app without proper Chinese font support.But..we can not live that a database table has non-Chinese character record.

In a couple of Delphi/Lazaurs forums inside China,fans are struggling this issue every day and exchange their tips and findings.But so far this issue still don't solved.

We are requesting the team to consider this issue.We just need a very basic ready-to-go Lazaurs for Chinese IT users.

Yours faithfully,
Sam
« Last Edit: July 14, 2011, 03:02:07 am by Goodman H__ »
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

Leledumbo

  • Hero Member
  • *****
  • Posts: 8831
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: A letter to the Team--from Chinese user
« Reply #1 on: July 14, 2011, 07:03:21 am »
I never use ODBC in Lazarus myself, so I don't know its Unicode support. AFAIK, ODBC is implemented on top of available drivers (see), and since Lazarus have full Unicode support, then it's the driver which must have Unicode support.

You can ask a feature request in the bug tracker, it's kinda useless if you post here since developers might not see and it might be forgotten.

Lacak2

  • Guest
Re: A letter to the Team--from Chinese user
« Reply #2 on: July 14, 2011, 07:33:15 am »
Yes there are some problems. See for example:
http://bugs.freepascal.org/view.php?id=17376
(root of this is that character length is not equal to byte length, which will lead to trimming some characters from end)

General answer is: you must set-up your ODBC connection (some drivers support this, some not) to return  character data encoded in UTF-8. Or provide own procedures, which on the fly (TField.OnGetText) will convert character data stored in local record buffer to UTF-8

In other cases you will see in db-aware controls "wrong" characters.

(And please post database related question into Database boardm  ;D)

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: A letter to the Team--from Chinese user
« Reply #3 on: July 14, 2011, 09:25:07 am »
This must be - as Leledumbo says - a driver issue.  I have used ODBC to connect to a DB2 database and I had no problems in using Chinese characters as the attached screen shot shows.  This - by the way - is done using a TODBCConnection from SQLDB.

« Last Edit: July 14, 2011, 09:27:52 am by Arbee »
1.0/2.6.0  XP SP3 & OS X 10.6.8

jixian.yang

  • Full Member
  • ***
  • Posts: 173
Re: A letter to the Team--from Chinese user
« Reply #4 on: July 14, 2011, 09:26:23 am »
There is a better solution without the database components modification:
http://bugs.freepascal.org/view.php?id=19341
kevin jiang' s code solved the problem perfectly.

Exactly the the native database components belong to Freepascal and Lazarus just calls it.

The better solution is Zeoslib, add "CodePage=UTF8" into the property "peoperties" of TZConnection, the characters works fine.
And it supports storedproc.

It is smart to select a powerful one.

Writing a common database component is not so different but it requires plenty time.



jixian.yang

  • Full Member
  • ***
  • Posts: 173
Re: A letter to the Team--from Chinese user
« Reply #5 on: July 14, 2011, 09:38:58 am »
And I do not know where I can find such a odbc driver for the DBF file or MDB file.

Goodman H__

  • Full Member
  • ***
  • Posts: 130
Re: A letter to the Team--from Chinese user
« Reply #6 on: July 14, 2011, 09:58:45 am »
Extactly,MDB file does not work for the case.I posted in the database thread a couple of months ago.
fpc:2.6.1 Lazarus:1.1 SVN39277
OS:win 7

 

TinyPortal © 2005-2018