DBF conversion

557 views
Skip to first unread message

d s

unread,
Sep 17, 2021, 8:51:42 AM9/17/21
to Harbour Users
How can I convert DBF file with 437 codepage data to DBF with cyrillic data, say 
SRWIN ?.  

I read many posts here, on SET( _SET_CODEPAGE, cCp ) and SET( _SET_DBCODEPAGE, cCp), but no success.
 
How can I read DBF with 437 code page and save its records to new DBF file converting character fileds to cyrillic SRWIN ? 

I can enter new SRWIN data, I can see it in GET fields, I can save it in DBF (I changed my Language for non-unicode programs to Serbian (Syrillic)). But how can I convert old 437 DBF data to SRWIN data in new DBF ?

Thank you and Best regards.

Simo.

Maurizio la Cecilia

unread,
Sep 17, 2021, 1:45:13 PM9/17/21
to harbou...@googlegroups.com
Hi.

  • hb_Translate( <cString>, [<FromCodePageID>], [<ToCodePageID>] )  cConvertedString
    changes character encoding of given string from one code-page to the other.
    If either of <FromCodePageID> or <ToCodePageID> is ommited then current (hb_vmCDP) codepage is used. If none of them is specified or is invalid or not available, an RTE occurs, which means that before invoking the function, the code page module(s) needed for conversion must have been linked (using a REQUEST HB_CODEPAGE_XXXXX statement).
    For a complete list of code-pages supported by Harbour see hb_cdpList() function. See also, hb_strToUTF8() similar function.

    hb_Translate() example usage:

      REQUEST hb_codepage_elwin, hb_codepage_utf8ex  
      cUTF8String := hb_Translate( "τα πάντα ρεί", "ELWIN", "UTF8" ) 
     // converts given string from codepage `cp-1253` to `UTF-8`
#include "hbextcdp.ch"

REQUEST HB_CODEPAGE_EN
REQUEST HB_CODEPAGE_SRWIN

dbUseArea( .t., , <EN_Database>, "en", .f., .f., "EN" )

dbUseArea( .t., , <SRWIN_Database>, "sr", .f., .f., "SRWIN" )

do while ! en->( Eof() )
      sr->( dbAppend() )
      sr-><fieldname1> := hb_Translate( en-><fieldname1>, "EN", "SRWIN" )
      sr-><fieldname2> := hb_Translate( en-><fieldname2>, "EN", "SRWIN" )
      ...
      sr-><fieldnameN> := hb_Translate( en-><fieldnameN>, "EN", "SRWIN" )

     en->( dbSkip() )
enddo

dbCloseAll()

The code above should do the job. Not tested, however.
Best regards.
--
Maurizio
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/b21a9bbf-c208-4c7c-9ca2-0163e8781808n%40googlegroups.com.


d s

unread,
Sep 17, 2021, 2:26:11 PM9/17/21
to Harbour Users
Thank you Maurizio !
I tried your function, but no success. In target DBF I got same records as in source DBF. It seems that HB_TRANSLATE function did nothing, no conversion.
These days I have read many posts about HB_TRANSLATE, HB_OEMTOANSI, HB_ANSITOOEM,  SET_CODEPAGE, SET_DBCODEPAGE, DBCREATE with codepage parameter and DBUSEAREA with codepage parameter.
Tried several suggestions. Among them are one with HB_TRANSLATE as yours nice example.
Unfortunately I could not make conversion from 437 to SRWIN.
I do not understand why HB_TRANSLATE do nothing. What am I missing ?

I work with Harbour 3.2. No GUI forms, just plain @ SAY and @ GET text forms. As I said, my Language for non-unicode programs is set to Serbian (Cyrillic). When I have @ GET end enter some string data, I can see cyrillic charaters. Then, I can store that data to some DBF. Later I can list and see that cyrillic data on screen, also can print them on laser printer. All works well. But this conversion is dead end for me.

Klas Engwall

unread,
Sep 17, 2021, 6:47:48 PM9/17/21
to harbou...@googlegroups.com
Hi Simo,
If I understand your GET & save description correctly you have set the
VM codepage to SRWIN with Set(_SET_CODEPAGE,"SRWIN") and then just save
the memory variables into the SRWIN version of the DBF and get the
cyrillic characters saved correctly. So that part is working as expected.

I do the same thing with SVWIN always in the the VM and open some tables
with SVCLIP (Clipper compatible, for historic reasons) and some with
SVWIN (when SVCLIP is not enough), and the data is always saved
correctly in both cases.

For the conversion I would begin with Set(_SET_CODEPAGE,"SRWIN") in the
VM, open both tables just like Maurizio suggested, specifying the
correct codepage for each version, read all fields from the "EN" table
in a loop into an array with fieldget() and then save all the fields in
the "SRWIN" table in a loop with fieldput(), and then proceed to the
next record until finished. Harbour has automatic conversion between the
DBF record and the memory variable provided that the DBF tables have
been opened with the correct codepage specified. There should be no need
to hb_Translate() the strings when using memory variables.

Regards,
Klas

Auge & Ohr

unread,
Sep 17, 2021, 10:00:15 PM9/17/21
to Harbour Users
hi,

i have try to use a German OEM DBF

open OEM DBF and Browse it ... will show wrong sign
use COEPAGE "DE850" -> Display OK

create new DBF with same Structure
open empty DBF with CODEPAGE "DEWIN" ( for ANSI )

transfer Data via FIELDGET() / FIELDPUT()

but Result in new (ANSI) DBF is wrong
"GRÜNE" become "GR" so it is "cut off" at Position of "Umlaut"

so what i´m doing wrong ?

Jimmy
p.s. i know to convert OEM -> ANSI with other Way ...
DBF2DBF.ZIP

d s

unread,
Sep 18, 2021, 3:51:01 AM9/18/21
to Harbour Users
Thank you Klas !

I have tried what you suggested, again no success.
I am sending little example which do not work at my place (DBFs and PRG).  I compiled it with hbbmk2 convklas.prg .
Driver I use is DBFNTX.
When you have a time please see this example and say is there are any error in PRG.  
cyrconv.rar

Klas Engwall

unread,
Sep 18, 2021, 5:15:37 AM9/18/21
to harbou...@googlegroups.com
Hi Simo,

> I have tried what you suggested, again no success.
> I am sending little example which do not work at my place (DBFs and
> PRG).  I compiled it with hbbmk2 convklas.prg .
> Driver I use is DBFNTX.
> When you have a time please see this example and say is there are any
> error in PRG.

I don't know much about Cyrillic, but as far as I can see your ITEMSEN
file only contains plain English 7-bit ASCII characters. I would not
expect them to be converted to anything 8-bit, whether Cyrillic or
Swedish or any other non-English character set.

I attach to this message a sample that correctly converts 8-bit
characters ÜÅÄÖüåäö between SV437C (I accidentally called it SVCLIP
yesterday, but that is just an alias I use) and SVWIN.

Regards,
Klas
convertdbf.zip

Klas Engwall

unread,
Sep 18, 2021, 5:21:19 AM9/18/21
to harbou...@googlegroups.com
Hi Jimmy,

> i have try to use a German OEM DBF
>
> open OEM DBF and Browse it ... will show wrong sign
> use COEPAGE "DE850" -> Display OK
>
> create new DBF with same Structure
> open empty DBF with CODEPAGE "DEWIN" ( for ANSI )
>
> transfer Data via FIELDGET() / FIELDPUT()
>
> but Result in new (ANSI) DBF is wrong
> "GRÜNE" become "GR" so it is "cut off" at Position of "Umlaut"
>
> so what i´m doing wrong ?

I can't really say why your text gets truncated. In the sample I just
posted in my response to Simo I use ÜÅÄÖüåäö, save the string to the OEM
version of the DBF and then convert that DBF to an ANSI version without
any problems. I suggest you check if it works for you too.

Regards,
Klas

d s

unread,
Sep 18, 2021, 5:31:08 AM9/18/21
to Harbour Users
Thank you Klas, again !

This is new to me that  plain English 7-bit ASCII characters can not to be converted to anything 8-bit, whether Cyrillic or Swedish or any other non-English character set !?
I do not know much about codepages. I only want to convert all non-cyrillic DBFs to DBFs with cyrillic hcaracter fields. 
Can I first convert plain English 7-bit ASCII characters to some 8-bit, and in second step to convert them to SRWIN ?

Best regards.
Simo. 

Klas Engwall

unread,
Sep 18, 2021, 6:41:37 AM9/18/21
to harbou...@googlegroups.com
Hi Simo,
As I said, I don't know much about Cyrillic and of the OEM codepages
used where Cyrillic characters are used. I did, though find this
character table for codepage 855:
https://en.wikipedia.org/wiki/Code_page_855

It shows that the Cyrillic characters are located in the upper half of
the ASCII table, just like the umlauted characters in Swedish, German
etc. The lower half is identical to the 437 codepage, and all the
characters in the EN version of your DBF fit in there, in the 7-bit part
of the ASCII table.

You would have to check with other users of Cyrillic what they do when
they use OEM (MS-DOS) codepages. I suppose your problem is that your DBF
file was created disregarding the special features of the Cyrillic
characters and substituting with standard English characters. Whether
that can be converted or not is difficult for me to comment on. I can
only say that if Swedish names like "Östen" and "Åke" were saved as
"Osten" and "Ake" (like people in English speaking countries would do)
there would be no way to automatically convert those names to a Windows
codepage or to UTF-8. "Osten" actually means "The cheese" - should the
cheese be converted to "Östen" too? It seems like a one-word-at-a-time
conversion problem.

Regards,
Klas

d s

unread,
Sep 18, 2021, 7:09:01 AM9/18/21
to Harbour Users
Klas thanks for your time !

Up to now I worked with plain English characters (437). All data are entered using that codepage, all DBFs are written using that codepage. I even not specified any codepage in my PRGs, no need to. I could work in that way.

Now I need to work with cyrillic data. With  Set(_SET_CODEPAGE,"SRWIN") I work fine with newly entered data. I see cyrillic data on screen when doing @ GET or @ SAY, I can write it to DBF and can print it.
But I have a lot of old DBF data created in previous 437 codepage with plain English characters. It will be very painful to again enter many, many character data in DBFs with new SRWIN codepage. So I thought that it is possible to somehow convert  old plain English data in new cyrillic data. My bet was HB_TRANSLATE, obviously in my case it is not. I thought that Harbour (many thanks to all experts for it !!) have functions to do that in easy way.

Best regards,
Simo.

Klas Engwall

unread,
Sep 18, 2021, 7:58:28 AM9/18/21
to harbou...@googlegroups.com
Hi Simo,
Unless there is an absolute one-to-one relationship between all A-Z plus
a-z English characters and the Cyrillic characters in the upper half of
the Cyrillic codepage the only way to make such a conversion automatic
is by using magic :-)

Regards,
Klas

d s

unread,
Sep 18, 2021, 8:08:49 AM9/18/21
to Harbour Users
HI Klas.

I can say that every A-Z an a-z English character have counterpart in Cyrillic chatacters (cant resist, "Counterpart" is very good science fiction series :), recommendation ).
For example, English character G is Cyrillic character Г, also F is Ф, and so on.
As this is true, please guide me what I need to do to make this conversion.
I will not bother anymore. Thanks again !

Simo.

d s

unread,
Sep 18, 2021, 9:03:06 AM9/18/21
to Harbour Users
Hi Klas.

Meanwhile I found character tables for 437 and Windows 1251. 
I will try to write PRG to convert 437 string, letter by letter (using ASC function) and convert each 437 letter to appropriate 1251 letter.
Hope this will work.

Best regards.
Simo


d s

unread,
Sep 18, 2021, 10:37:50 AM9/18/21
to Harbour Users
HI Klas.

Thanks to you and Maurizio I did conversion !
I made an array table with ASC codes for every 437 codepage alphabet letter and ASC code for same 1251 cyrillic letter.
Then I wrote function which takes 437 character string and convert it to cyrillic counterpart, letter by letter. Converted string I wrote to new DBF.  All works well.
As soon as I can I will prepare some example PRG, so it can help some other folks.

Best regards,
Simo.

d s

unread,
Sep 18, 2021, 2:08:17 PM9/18/21
to Harbour Users
Hi.

I am sending small example on how to convert DBF with 437 data to new DBF with 1251 (SRWIN cyrillic character fields).
I compiled it with hbmk2 convklas.prg. In my place it works as I needed. I will use it to convert old DBFs with 437 data to new DBFs with cyrillic data.
In convklas.prg I used static aLetter array to store ASC codes for 437 letters along with ASC codes for appropriate cyrillic letters. 
In str2cyr.prg (string to cyrillic) conversion works letter by letter. This is first simple version, so anyone can extend table and conversion part according to its specific needs.  

I hope this will help someone with similar problem.

Best regards,
Simo.

437_to_1251.rar

Auge & Ohr

unread,
Sep 19, 2021, 12:48:06 AM9/19/21
to Harbour Users
hi Klas,

it was my Error as Apps was set to UTF8 and i have open ANSI DBF without "DEWIN"
now it work as you say so i can try more Test.

Question : is it possible with "DE850" -> "UTF8" ?

Jimmy

Auge & Ohr

unread,
Sep 19, 2021, 1:12:18 AM9/19/21
to Harbour Users
hi,

i try to use your ITEMSSR.DBF with CODEPAGE

there is
REQUEST HB_CODEPAGE_SRWIN
and i have  "SRISO" and "SR852"

but i get a Error when set CODEPAGE ("SR852")

then i try
REQUEST HB_CODEPAGE_SR850
but it does not exist
undefined reference to `HB_FUN_HB_CODEPAGE_SR850

so how can i use CODEPAGE ("SR852")

Jimmy

d s

unread,
Sep 19, 2021, 2:32:42 AM9/19/21
to Harbour Users
Hi  Auge & Ohr

On this link   https://harbour.github.io/doc/harbour.html#hb_cdpselect    I found list of codepages we can use. In that list there is no SR850 nor SR852.

Next, on link   http://harbourlanguage.blogspot.com/2010/06/harbour-codepage.html   you can find heading "codepage sample" where you can find useful Zoran Sibinovic's function to list characters in codepages. 

Also, i found somewhere PRG that lists internal codepage identifications in Harbour (my apologize to author, I forgot where I found this function). I am sending it as attachment. Also, in \harbour\incude\hbapicdp.h you can find same codepage  internal identifications. You can see that internally exists cp850 and cp852.

May be you can use Slovenian SL852 ?

Best regards,
Simo.
listcdp.rar

Klas Engwall

unread,
Sep 19, 2021, 5:56:03 PM9/19/21
to harbou...@googlegroups.com
Hi Jimmy,

> it was my Error as Apps was set to UTF8 and i have open ANSI DBF without
> "DEWIN"
> now it work as you say so i can try more Test.
>
> Question : is it possible with "DE850" -> "UTF8" ?

I suppose so. All codepages are are specified using UTF8. Check out the
commit message below and others around the same time:

2013-01-30 10:34 UTC+0100 Viktor Szakats (vszakats.net/harbour)

Regards,
Klas

Klas Engwall

unread,
Sep 19, 2021, 6:22:52 PM9/19/21
to harbou...@googlegroups.com
Hi Simo,
It looks like a good solution for a one-time conversion ... except that
if the source data were anything else than plain English you would get a
double conversion! Your conversion is ASCII value based (one ASCII value
into another), and since you specify codepages for both the DBF tables
and the VM there will be an automatic conversion from the source table
to the VM and you will then look at the ASCII values of already
converted characters when you switch them using your <aLetter> array.

To clarify: For general use, reading and writing regular text strings in
a DBF with a codepage that is different from the one in the VM, this is
the correct way to specify them. But for this specific case, the
conversion of ASCII values one by one, you would run into surprises with
anything that is not plain EN text.

One more thing to think about when using Harbour's automatic codepage
conversion in day-to-day operations: It will convert binary data in
character fields too! So if you for example save encrypted passwords
they will be converted when you read and write them. Whether that is
good of bad may vary from one case to the next. Solution: Convert binary
data to hex before saving.

Regards,
Klas

Auge & Ohr

unread,
Sep 19, 2021, 9:24:46 PM9/19/21
to Harbour Users
hi,

i have made FUNCTION Get_cdpSelect() to get a Array.
but Array is incomplett ... who can help

Jimmy
Get_CDP.zip

d s

unread,
Sep 20, 2021, 2:13:37 AM9/20/21
to Harbour Users
Hi Klas.

Thank you for your valuable observations on my small example.
Yes, I will do one-time conversion. My character fields are only plain English text. 
If there are some rare records with a few special characters, I will do it manually.
For now no need for some general solution. 

d s

unread,
Sep 20, 2021, 2:27:31 AM9/20/21
to Harbour Users
Hi Jimmy,

Please explain what do you mean when you say  Array is incomplete ? 

Best regards,
Simo.

Message has been deleted

Auge & Ohr

unread,
Sep 20, 2021, 3:59:55 AM9/20/21
to Harbour Users

i made this App to identify many Type of DBF and convert Codepage
These Type are available

"Bulgarian            ", "866         " "BG866 "
"Bulgarian            ", "ISO-8859-5  " "BGISO "
"Bulgarian            ", "MIK         " "BGMIK "
"Bulgarian            ", "Windows-1251" "BGWIN "
"Croatian             ", "437         " "HR437 "
"Croatian             ", "852         " "HR852 "
"Croatian             ", "Windows-1250" "HRWIN "
"Czech                ", "852         " "CS852 "
"Czech                ", "ISO-8859-2  " "CSISO "
"Czech                ", "KAM         " "CSKAM "
"Czech                ", "Windoes-1250" "CSWIN "
"English              ", "437         " "EN    "
"French               ", "850         " "FR850 "
"German OEM           ", "850         " "DE850 "
"German ANSI          ", "ISO-8859-1  " "DEWIN "
"Greek                ", "737         " "EL737 "
"Greek                ", "Windows-1253" "ELWIN "
"Hungarian (ntxhu852) ", "852         " "HU852C"
"Hungarian (sixhu852) ", "852         " "HU852 "
"Hungarian (ntxhu852) ", "ISO-8859-2  " "HUCWI "
"Hungarian (sixhu852) ", "ISO-8859-2  " "HUISO "
"Hungarian (ntxhu852) ", "Windows-1250" "HUWIN "
"Hungarian (sixhu852) ", "Windows-1250" "      "
"Italian              ", "437         " "IT437 "
"Italian              ", "850         " "IT850 "
"Italian              ", "ISO-8859-1b " "ITISB "
"Italian              ", "ISO-8859-1  " "ITISO "
"Lithuanian           ", "Windows-1257" "LTWIN "
"Polish               ", "852         " "PL852 "
"Polish               ", "ISO-8859-2  " "PLISO "
"Polish               ", "Mazowia     " "PLMAZ "
"Polish               ", "Windows-1250" "PLWIN "
"Portuguese           ", "850         " "PT850 "
"Portuguese           ", "ISO-8859-1  " "PTISO "
"Russian              ", "866         " "RU866 "
"Russian              ", "KOI-8       " "RUKOI8"
"Russian              ", "Windows-1251" "RU1251"
"Serbian              ", "Windows-1251" "SRWIN "
"Slovak               ", "852         " "SK852 "
"Slovak               ", "ISO-8859-2  " "SKISO "
"Slovak               ", "Kamenicky   " "SKKAM "
"Slovak               ", "Windows-1250" "SKWIN "
"Slovenian            ", "437         " "SL437 "
"Slovenian            ", "852         " "SL852 "
"Slovenian            ", "ISO-8859-2  " "SLISO "
"Slovenian            ", "Windows-1250" "SLWIN "
"Spanish              ", "850         " "ES850 "
"Spanish              ", "ISO-8859-1  " "ESWIN "
"Spanish Modern       ", "ISO-8859-1  " "ESMWIN"
"Swedish              ", "850         " "SV850 "
"Swedish (Clipper)    ", "437         " "SV437C"
"Swedish              ", "ISO-8859-1  " "SVWIN "
"Turkish              ", "857         " "TR857 "
"Turkish              ", "Windows-1254" "TRWIN "
"Ukrainian            ", "866         " "UA866 "
"Ukrainian            ", "KOI-8U      " "UAKOI8"
"Ukrainian            ", "Windows-1251" "UA1251"
"UTF-8                ", "UTF8        " "UTF8  "

Jimmy


Auge & Ohr

unread,
Sep 20, 2021, 4:55:33 AM9/20/21
to Harbour Users
hi,

these Elemets are not clear

AADD(aCDP,{"German    ", "850         ","DE    ","          ", "850         ", "DE850 "} ) //
AADD(aCDP,{"Greek     ", "737         ","EL    ","cp737     ", "737         ", "EL737 "} ) //
AADD(aCDP,{"Hungarian ", "852         ","HU852 ","          ", "852         ", "HU852C"} ) //       //  (ntxhu852)
AADD(aCDP,{"Hungarian ", "852         ","HU852S","          ", "852         ", "HU852 "} ) //       //  (sixhu852)
AADD(aCDP,{"Hungarian ", "ISO-8859-2  ","HUISO ","          ", "CWI-2       ", "HUCWI "} )          //  (ntxhu852)
AADD(aCDP,{"Hungarian ", "ISO-8859-2  ","HUISOS","          ", "ISO-8859-2  ", "HUISO "} )          //  (sixhu852)
AADD(aCDP,{"Hungarian ", "Windows-1250","HUWIN ","          ", "Windows-1250", "HUWIN "} )          //  (ntxhu852)
AADD(aCDP,{"Hungarian ", "Windows-1250","HUWINS","          ", "            ", "      "} ) //       //  (sixhu852)
AADD(aCDP,{"Lithuanian"," Windows-1257","LT    ","cp1257    ", "Windows-1257", "LTWIN "} ) //
AADD(aCDP,{"Spanish   ", "850         ","ES    ","          ", "850         ", "ES850 "} ) //
AADD(aCDP,{"Swedish   ", "437         ","SVCLIP","          ", "437         ", "SV437C"} ) //

3rd. Element does not match 6th. Element

for German "DE" -> "DE850" is clear but other i don´t know

Jimmy

Klas Engwall

unread,
Sep 20, 2021, 2:00:52 PM9/20/21
to harbou...@googlegroups.com
Hi Jimmy,
How did you create this table? Did you extract all #define HB_CP_ID
lines from the Harbour sources? If so, the one that says SVCLIP (in
cpsv437c.c) is guarded with #if 0 ... #endif, meaning that the entire
SVCLIP definition package has been replaced with SV437C a few lines
further down in that source file. Also see the "2009-11-10 15:05
UTC+0100 Viktor Szakats (vszakats.net/harbour)" changelog entry for
Viktor's comments. SVCLIP does not exist anymore.

Regards,
Klas

Auge & Ohr

unread,
Sep 20, 2021, 3:12:44 PM9/20/21
to Harbour Users
hi Klas,

Yes i have try to extract all Information from Link which was posted.

my Main Question is which Element are used for Codepage ... i use last Element of Row
so i use "DE850" instead of "DE" ... or is it the same ?

what about those "Hungarian" Codepage ... are they right ?

Jimmy

Klas Engwall

unread,
Sep 20, 2021, 7:37:41 PM9/20/21
to harbou...@googlegroups.com
Hi Jimmy,

> Yes i have try to extract all Information from Link which was posted.
>
> my Main Question is which Element are used for Codepage ... i use last
> Element of Row
> so i use "DE850" instead of "DE" ... or is it the same ?
>
> what about those "Hungarian" Codepage ... are they right ?

Sorry, I didn't pay much attention to the message with the long list of
codepages and just responded to the message with the short list. And I
had forgotten that you don't use "plain" Harbour but the HMG variant. I
really don't know how identical or how different HMG and Harbour are.

But based on the fact that SVCLIP is deprecated and SV437C is now used
instead in Harbour I would say that the column in the list that mentions
SVCLIP is NOT the one to use.

About Hungarian codepages, Viktor is from Hungary, and he was deeply
involved in creating all the codepages based on Przemek's new codepage
subsystem back in 2009. But then again, some of them are probably
deprecated. You would have to look in each of the source files to find
out about that.

I am in no way an expert on Eastern European codepages. I got involved
in the codepage "business" many years ago when I found that XHB had no
Swedish codepage, so I created the earliest version of that one. Przemek
and Viktor then ported it to Harbour in several different steps making
it technically very different from the original but with the same
special handling of the Swedish collation. That is about as much as I
know :-)

Regards,
Klas

Auge & Ohr

unread,
Sep 20, 2021, 8:18:19 PM9/20/21
to Harbour Users
hi Klas,

Thx for your Answer.

as "SV437C" is in same Column like "DE850" it seem to be right to use last Column as i thought

---

it is true that HMG DOC File show less (possible) Codepage but it seems i can REQUEST those HB_CODEPAGE_*

is there a List of harbour CODEPAGE_* which can be request ?

Jimmy

Klas Engwall

unread,
Sep 21, 2021, 4:02:56 AM9/21/21
to harbou...@googlegroups.com
Hi Jimmy

> Thx for your Answer.
>
> as "SV437C" is in same Column like "DE850" it seem to be right to use
> last Column as i thought

As I said, check the source code in the src\codepage directory

> it is true that HMG DOC File show less (possible) Codepage but it seems
> i can REQUEST those HB_CODEPAGE_*

All codepages are compiled into one big lib file. You should always
request the ones you intend to use so they are pulled from that lib into
your application.

> is there a List of harbour CODEPAGE_* which can be request ?

I have never seen one. Again, the easiest way to find out which
codepages exist is by looking in the src\codepage directory.

Regards,
Klas

Maurizio la Cecilia

unread,
Sep 21, 2021, 7:54:21 AM9/21/21
to harbou...@googlegroups.com
Hi Jimmy,
AFAIK the Harbour cp list could be obtained from  <HarbourRoot>\include\hbcpage.hbx

Anyway, there is it:

HB_CODEPAGE_BG866
HB_CODEPAGE_BGISO
HB_CODEPAGE_BGMIK
HB_CODEPAGE_BGWIN
HB_CODEPAGE_CS852
HB_CODEPAGE_CS852C
HB_CODEPAGE_CSISO
HB_CODEPAGE_CSKAMC
HB_CODEPAGE_CSWIN
HB_CODEPAGE_DE850
HB_CODEPAGE_DE850M
HB_CODEPAGE_DE858
HB_CODEPAGE_DEISO
HB_CODEPAGE_DEWIN
HB_CODEPAGE_DK865
HB_CODEPAGE_EE775
HB_CODEPAGE_EEWIN
HB_CODEPAGE_EL437
HB_CODEPAGE_EL737
HB_CODEPAGE_ELISO
HB_CODEPAGE_ELWIN
HB_CODEPAGE_EN
HB_CODEPAGE_ES850
HB_CODEPAGE_ES850C
HB_CODEPAGE_ES850M
HB_CODEPAGE_ESISO
HB_CODEPAGE_ESMWIN
HB_CODEPAGE_ESWIN
HB_CODEPAGE_FI850
HB_CODEPAGE_FR850
HB_CODEPAGE_FR850C
HB_CODEPAGE_FR850M
HB_CODEPAGE_FRISO
HB_CODEPAGE_FRWIN
HB_CODEPAGE_HE862
HB_CODEPAGE_HEWIN
HB_CODEPAGE_HR646
HB_CODEPAGE_HR852
HB_CODEPAGE_HRISO
HB_CODEPAGE_HRWIN
HB_CODEPAGE_HU852
HB_CODEPAGE_HU852C
HB_CODEPAGE_HUISO
HB_CODEPAGE_HUWIN
HB_CODEPAGE_IS850
HB_CODEPAGE_IS861
HB_CODEPAGE_IT437
HB_CODEPAGE_IT850
HB_CODEPAGE_IT850M
HB_CODEPAGE_ITISB
HB_CODEPAGE_ITISO
HB_CODEPAGE_ITWIN
HB_CODEPAGE_LT775
HB_CODEPAGE_LTWIN
HB_CODEPAGE_LV775
HB_CODEPAGE_LVWIN
HB_CODEPAGE_NL850
HB_CODEPAGE_NL850M
HB_CODEPAGE_NO865
HB_CODEPAGE_PL852
HB_CODEPAGE_PLISO
HB_CODEPAGE_PLMAZ
HB_CODEPAGE_PLWIN
HB_CODEPAGE_PT850
HB_CODEPAGE_PT860
HB_CODEPAGE_PTISO
HB_CODEPAGE_RO852
HB_CODEPAGE_ROISO
HB_CODEPAGE_ROWIN
HB_CODEPAGE_RU1251
HB_CODEPAGE_RU866
HB_CODEPAGE_RUISO
HB_CODEPAGE_RUKOI8
HB_CODEPAGE_SK852
HB_CODEPAGE_SK852C
HB_CODEPAGE_SKISO
HB_CODEPAGE_SKKAMC
HB_CODEPAGE_SKWIN
HB_CODEPAGE_SL646
HB_CODEPAGE_SL852
HB_CODEPAGE_SLISO
HB_CODEPAGE_SLWIN
HB_CODEPAGE_SR646
HB_CODEPAGE_SR646C
HB_CODEPAGE_SRWIN
HB_CODEPAGE_SV437C
HB_CODEPAGE_SV850
HB_CODEPAGE_SV850M
HB_CODEPAGE_SVISO
HB_CODEPAGE_SVWIN
HB_CODEPAGE_TR857
HB_CODEPAGE_TRISO
HB_CODEPAGE_TRWIN
HB_CODEPAGE_UA1125
HB_CODEPAGE_UA1251
HB_CODEPAGE_UA866
HB_CODEPAGE_UAKOI8
HB_CODEPAGE_UTF16LE
HB_CODEPAGE_UTF8
HB_CODEPAGE_UTF8EX

Best regards.
--
Maurizio
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/5ea048a5-ba1a-48f4-84d0-973837769979n%40googlegroups.com.


Auge & Ohr

unread,
Sep 21, 2021, 5:28:59 PM9/21/21
to Harbour Users
hi,

Thx for Information.

as they are "more" than i got i have to figure out what is the difference e.g.

HB_CODEPAGE_UTF8
HB_CODEPAGE_UTF8EX
HB_CODEPAGE_UTF16LE

and how to REQUEST to use these Codepage

Jimmy
Reply all
Reply to author
Forward
0 new messages