Binary dump and code page

Posted by e.schutten on 17-Sep-2018 06:45

Hi,

I wonder what code page is used to create the binary dump file?

Is it the code page of the database?

Is it the code page of the -pf utf-8.pf file (cp-internal, cpstream)?

Is it the code page of the startup.pf (cp-internal, cpstream)?

Is it the code page of Windows?

proutil database -C dump table c:\DUMP -pf utf-8.pf 

Kind regards,

Edwin

Windows 2008

OpenEdge 10.2B08

Posted by George Potemkin on 17-Sep-2018 13:16

> why is the code page of the file ANSI and not UTF-8?

Binary dump is a binary file. As an OS file it does not have a code page.

Look inside the file. You will see "UTF-8" near the beginning of the file.

> When I do an ASCII dump from the database administrator, the code page of the file is UTF-8.

It's the -cpstream value

All Replies

Posted by George Potemkin on 17-Sep-2018 06:48

Binary dump does not parse each record per fields. The records are dumped (almost) in the form as they're stored in database. Hence it's the code page of the database.

Posted by e.schutten on 17-Sep-2018 06:52

The code page of the database is UTF-8, but when I open the file in Notepad++ I notice that the code page of the dump file is ANSI.

Posted by George Potemkin on 17-Sep-2018 06:57

knowledgebase.progress.com/.../19912

Starting with OpenEdge 10 and later, binary dump does record the code page of the text being written to the dump file (.bd). This can only be loaded into a database that uses the same code page. This ensures that there is no possibility of data corruption when loading the data resulting from code page differences. Failure to load into a database with the same code page will result in error 10855:
Code page of .bd file (<namne>) does not match code page of database(<name>). (10855)

Posted by e.schutten on 17-Sep-2018 08:12

Ok, but why is the code page of the file ANSI and not UTF-8?

When I do an ASCII dump from the database administrator, the code page of the file is UTF-8.

Posted by George Potemkin on 17-Sep-2018 13:16

> why is the code page of the file ANSI and not UTF-8?

Binary dump is a binary file. As an OS file it does not have a code page.

Look inside the file. You will see "UTF-8" near the beginning of the file.

> When I do an ASCII dump from the database administrator, the code page of the file is UTF-8.

It's the -cpstream value

This thread is closed