Seems that OH1KH has the same problem that I have (on Windows) since I tried FPC 3.2.0:
When I read data from a SQLite-DB, for so many years (at least since FPC 2.6.4 and until 3.0.4) this data was
always in UTF8 - for console and GUI programs - regardless whether Unit LazUTF8 was used or not. But now (if Unit LazUTF8 is not used) this data is instead returned in Windows-charset (ANSI 1252). But the SELECT-Statements, if they include characters like Ä Ö Ü ä ö ü ß, have still to be in UTF8. Crazy...
Of course I read above
release notes multiple times. But I do not understand too much of what is written there - especially not, how a solution for existing code could look - and I'm not a bloody beginner (started with Turbo Pascal 3 nearly 35 years ago).
I wasted 2 days with useless tries to find a global/central solution, which does
not require to change endless code lines in every program and in multiple common units but I failed. Then I had to stop this because I have enough other todo's with higher prio and I decided for now
not to use FPC 3.2.0 (but this is not the sense of a new release).
And this was
not the 1st time, where breaking code changes in a new release in combination with insufficient release notes caused to me a lot of time consuming and frustrating troubles :-((
I appreciate the continuous work of the FPC developers to improve and enhance FPC. Thanks a lot to them. But if they break existing code, I think it is important, to write in the release notes not only what they have changed and why. If things are not trivial - as here - additionally there should be clear instructions, how to adapt existing code:
- step 1: do this
- step 2: do that
- step 3: if you have ... then do ... else do ...
If not, FPC developers do a disservice to a lot of FPC users who have existing code: of course the developer, who changes something like this, is an expert in this area and is the one, who can at easiest overlook how is the best/easiest way to adapt existing code. A lot of "normal FPC users" / hobbyists are far away from that and are thrown into a lot of trouble plus the risk of adding unneccessary bugs.How could / should a solution for this problem look like?
- it should not be neccessary that every FPC user has to change "hundreds" of code lines
- there should be something like a global/central setting in one of the classes, which are involved to access a database (e.g. TSQLConnection?) so that you "only" have to adapt 1 code line for each whole database
- and the effort should be reasonable, that common units could be adapted in a way (e.g. via not too much $IFDEF), that they can be compiled both with the new FPC release and with some older FPC versions.@JuhaManninen:
I see your name since a long time and assume that you have some influence in the FPC community. Would you please be so kind to forward the blue and green parts to the FPC developers? I hope that this could help
- that release notes in the future become more expressive and helpful - especially for breaking code changes
- that this current issue will be fixed in a wise way.
Thanks a lot to you.