Lazarus+Firebird+ZeosDBO: Cannot read files in Hangul

When connecting to Firebird using ZeosDBO in Lazarus, if the filename contains Hangul(Korean), the database file cannot be read. Using UTF8ToSys() or Utf8ToAnsi() was of no use. The error occurs when Firebird calls CreateFile(open), though with TIBConnection the file can be read if I apply UTF8ToSys() to DatabaseName.

I liked ZeosDBO as it seems faster that TSQLConection, but now is the time to turn off autocommit and manually do it. Well, considering the origin(a component for Delphi), support for Lazarus is ought to be limited.

Found in following environment:
Lazarus 1.2.4, ZeosDBO 7.1.3a, Firebird 2.5

P.S:Considering the case, the same would happen to files with Chinese or Japanese characters in the name. Pity to CJK users!(including me)

Lazarus+Firebird+ZeosDBO: 한글 파일명 읽기 불가능

Lazarus에서 ZeosDBO를 사용해서 Firebird에 접속할때 파일명이 한글로 되어있으면 파일을 읽지 못하는 문제가 있습니다. UTF8ToSys()나 UTF8ToAnsi()를 사용해도 마찬가지였습니다. 정확히는 Firebird가 파일을 읽기 위해 CreateFile(open)을 호출할때 오류를 일으킵니다. 하지만 TIBConnection은 DatabaseName에 UTF8ToSys()를 적용해주면 정상적으로 동작하더군요.

ZeosDBO가 TSQLConnection보다 속도가 빨라서 좋아했는데, 이젠 TIBConnection에서 autocommit 끄고 돌린 다음에 수동으로 commit하는게 나을 것 같습니다. 아무래도 델파이용으로 만들어진 컴포넌트다보니 Lazarus 지원은 썩 좋지 않은 듯 하네요.

Lazarus 1.2.4, ZeosDBO 7.1.3a, Firebird 2.5에서 확인했습니다.

PostgreSQL vs. SQLite: read & write in multithreaded environment

The start was humble. I needed to cache some data, and I thought just push them to database table and give index, and the rest will be datab...

Popular in Code{nested}