[GNC] GnuCash SQLite: file attachments not recognized across platforms.
tarik semrade
tarik-semrade at embedded-semrade.com
Mon Dec 29 13:01:46 EST 2025
The path with the new version works as well. Thank you for your help.
GnuCash could manage paths between Linux and Windows using relative paths.
Thank you all, and Happy New Year! 🙂
Regards
Tarik
Le 29/12/2025 à 18:17, tarik semrade a écrit :
> I have the idea of installing the latest version on a Windows virtual
> machine, and it seems to me that special characters are not an issue
> there.
> I’ll install the new version, clean |%APPDATA%|, then clone my SQLite
> database and open it. Hop it resolve the first issue!
>
> I didn’t find a solution for Pathos.
>
>
> Le 29/12/2025 à 15:55, tarik semrade a écrit :
>>
>> Hello Jim,
>>
>> Let me explain in more detail. On my Windows machine, I wanted to
>> upgrade to the latest release version, maybe 5.14 and not 5.15.
>>
>> When I installed this version, the SQLite file would not open because
>> it was using the old folder in |%APPDATA%| that had been created by
>> the old version (5.5).
>>
>> When I removed (or renamed) this folder and let the new version
>> create its own folder, the SQLite file finally opened. However, some
>> characters in the accounts appeared incorrectly, such as “,” because
>> I use the French version.
>>
>> It looks like an encoding issue.
>>
>> I don’t know how to fix this or how to make both my GnuCash
>> applications on Linux and Windows use the same encoding. After this
>> experience, I went back to the old version, restored the old
>> |%APPDATA%| folder, and everything was fixed naturally.
>>
>> That being said, the second issue I mentioned is the path problem:
>>
>> I want to use an absolute path so that attached files can be opened
>> on both Linux and Windows.
>>
>> I know that the path separator is not the same character on Linux and
>> Windows. For now, I only manage attached invoices on my Windows
>> machine, and this has been done from the beginning using an absolute
>> path.
>>
>> I have remote access to this machine, so using relative paths would
>> also be fine. I think GnuCash may not handle the Windows path
>> separator correctly, because on my Linux machine I looked at a path
>> stored by my Windows machine and the “/” was replaced by “_”, which
>> cannot work anyway.
>>
>> The idea is that if I clone my repository on a Windows machine, the
>> files can be found easily. If it also works on Linux, that would be a
>> plus.
>>
>> I think my first post was not clear. I am sorry for the
>> misunderstanding.
>>
>> Regards,
>>
>> Tarik
>>
>> Le 28/12/2025 à 22:23, Jim DeLaHunt a écrit :
>>>
>>> Hello, Tarik:
>>>
>>> Welcome to GnuCash. I hope you will be able to get useful help on
>>> this list.
>>>
>>> On 2025-12-28 08:31, tarik semrade wrote:
>>>> Hello,
>>>>
>>>> I am a GnuCash user and I use GnuCash on two machines: Linux and
>>>> Windows.
>>>>
>>>> I switched to the SQLite file format in order to use a Python
>>>> library and be able to test and parse the SQLite database.
>>>>
>>>> One issue I am facing concerns the use of *absolute paths on
>>>> Windows*. When I started using GnuCash on Windows, I attached files
>>>> using absolute paths. After some time, I realized that Windows
>>>> paths could cause problems: when I open my book on another machine,
>>>> the linked files are not recognized.
>>>>
>>>> For this year, after resetting all the accounts, I want to start a
>>>> new year with a more flexible method, since I use GnuCash from both
>>>> Linux and Windows.
>>>>
>>>> I used to use GitHub to synchronize the files. The GnuCash version
>>>> on Windows is 5.5, while on my Ubuntu 25 system I use version 5.15.
>>>> The book opens correctly without issues on both systems. However,
>>>> one thing I tested was updating the Windows version of GnuCash to
>>>> the latest release to match my Linux machine. I noticed that when I
>>>> open the book with the latest Windows version, some strange
>>>> characters appear. I reinstalled the 5.5 version since it works good.
>>>>
>>>> If you have any recommendations to help resolve the issue with
>>>> linked file paths, I would be very grateful.
>>>
>>> I did some work on the file paths for my transaction attachments, so
>>> I have some idea of how these paths work in GnuCash. I can offer
>>> hints, but not a full solution.
>>>
>>> It would help if you could give examples of these "strange
>>> characters". Can you give a screen of what they look like, and what
>>> you expect to see if there are no "strange characters"?
>>>
>>> What originally saved the paths with these strange characters to
>>> your GnuCash file? Was it GnuCash 5.5 on Windows, and now GnuCash
>>> current version shows strange characters on those same paths? Or is
>>> it just paths which you saved using GnuCash on Linux which appear
>>> with strange characters in GnuCash on Windows current version?
>>>
>>> I don't know if the GnuCash app makes promises that attachment paths
>>> work across platforms. I do know:
>>>
>>> * Absolute paths are unlikely to work, because the roots of
>>> absolute paths are different on Windows and Linux (e.g.
>>> "C:\Users" and "/usr/". So, using relative paths to attachments
>>> is more likely to work.
>>> * Windows and Linux use different path separator characters ("\"
>>> and "/").
>>> * Windows and Linux use different character code conventions to
>>> store path names (16-bit UTF-16LE and 8-bit UTF-8).
>>>
>>> It is possible that GnuCash code makes an effort to smooth over
>>> these differences. It is also possible that it makes no particular
>>> effort. If you are comfortable reading software source code, you
>>> could read the GnuCash source code to try and find out.
>>>
>>> I hope this helps you take some steps forward. Best regards,
>>> —Jim DeLaHunt
>>>
>>>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
More information about the gnucash-user
mailing list