0

I'm trying to import a .db file into a existing database through a tools called 'Import Data' in IBExpert.

I have a problem with the encoding of the .db file, when the import is done characters like 'ç, ã, õ' are not recognized.

I've been trying to change the character set of the table to UTF8 and WIN1252 or the character set of the .db file, but it did not work.

The word ASCEN€ÇO for example, would have to be ASCEÇÃO.

How can I fix this character set problem?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • `when the import is done characters like 'ç, ã, õ' are not recognized.` - what do you mean specifically ? DB-file is changed during import? – Arioch 'The Feb 15 '19 at 13:03
  • No, already in the file the characters are wrong and on import just the same way. – Vicenzo Martinelli Feb 15 '19 at 13:32
  • if you open that DB file with other tools than IBExpert - can you make those characters show properly ? – Arioch 'The Feb 15 '19 at 13:36
  • And if you say `in the file the characters are wrong` then there is no point in changing table or connection charset, that would matter on writing. But you have to start with making correct reading... – Arioch 'The Feb 15 '19 at 13:37
  • i have tried to open it with .net code, notepad and ibexpert. – Vicenzo Martinelli Feb 15 '19 at 13:45
  • with many encondigs, i think the problem is in the file – Vicenzo Martinelli Feb 15 '19 at 13:47
  • the problem is, there was one "real" library to work with Paradox files, that is long dead BDE with surplus utilities like Database Desktop. It is long dead both officially and de facto (modern Windows). There was a handful of ad hoc libraries for partial parsing of paradox files, for example on GitHub, but they are not BDE replacements, and I would not expect all BDE charsets support in them. And then who said it was Paradox file, not just any other file (for example SQLite) with .db extension? – Arioch 'The Feb 15 '19 at 13:49
  • If you get the data wrong out of the paradox file, then you can't magically expect changing the Firebird connection character set to fix it. You will need to fix either how you read the data from the paradox file (right character set), or you need to 'manually' fix the data (assuming that is even possible) before persisting to a Firebird database, or perform some other form of character set mapping. – Mark Rotteveel Feb 15 '19 at 14:01
  • 1
    It is possible that paradox used a different character set than you think. Search for character sets where 0x80 (`€` in 1252) and 0xC7 (`Ç`) map to `Ç` and `Ã` instead. For example Cp850 (DOS850; Western Europe) has this mapping, but there are others (eg 857; Turkish) and there are probably others. – Mark Rotteveel Feb 15 '19 at 14:03
  • 1
    Paradox files are still used in one Russian state-standard economic data. I hope I would never be demanded to import it... – Arioch 'The Feb 15 '19 at 17:43
  • 1
    I solved it with a program called Paradox data editor. – Vicenzo Martinelli Feb 19 '19 at 12:25

0 Answers0