On Tue, 27 Apr 2010, Siny wrote: Hi,
> I set the codepage succesfully. There are correct characters on the screen > and on the keyboard, too. But... The seek do not works when the string > certains a Hungarian character. I think that there are old-coded characters > in the databases. So you haven't set CP correctly. Copy & past from examples sent by other users without investing sometime to check what some functions do is not good idea because like above you "resolved" one problem creating other ones. > Do anyone know a tool which can change this characters in databases > into a given type? For example into iso852 or unicode852. And I am > interesting in it regardin to changing soure code automatically You have to understand what different CP functions do before you will use them and you will find that you can set all what you need in few different versions. SET( _SET_CODEPAGE, <cCDP> ) -> <cPrevCDP> sets internal HVM codepage which is used in string comparison operation functions like UPPER()/LOWER()/ISALPHA()/ISUPPER()/ISLOWER()/ISDIGIT()/... and also as default CP for RDD when new table is open and for GT in HB_SETTERMCP()/HB_SETDISPCP()/HB_SETKEYCP(). Some GTs also use it even without calling above functions. HB_CDPSELECT(...) makes the same job as SET( _SET_CODEPAGE, ... ). HB_SETTERMCP( <cTermCP> [,<cHostCP>] [,<lBoxChar>] ) Sets terminal CP and enables automatic translation between <cHostCP> (HVM CDP) and <cTermCP> in all IN (keyboard) / OUT (screen) operations. If <lBoxChar> is .T. then it forces using national letters also in box drawing effectively disabling using CP437 box characters in DISPBOX() and related functions. HB_SETDISPCP() sets only output (screen) translation and HB_SETKEYCP() sets only input (keyboard) translation. When new table is open then you can use CODEPAGE clause in USE command to enable automatic translation between HVM code, i.e.: USE myTable CODEPAGE <cCDP> It also controls collating order but please remember that it cannot be used if table contains binary data. If you want to avoid such problems then you should use the same HVM CP as your tables. So you can specify CODEPAGE in USE command (or as 7-th parameter of dbUseArea() function) but you can also set the same CP as you used in your Clipper/... programs and which is used by your DBF files using SET( _SET_CODEPAGE, <cCDP> ) or HB_CDPSELECT( <cCDP> ) and only set valid output CP using HB_SETTERMCP(). In UNICDOE Harbour builds is enough to make: SET( _SET_CODEPAGE, <cCDP> ) HB_SETTERMCP( <cTermCDP>, <cCDP> ) HTH best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour