I started to learn Pascal because I wanted to create cross-platform GUI applications (where 'cross-platform' means Linux and Windows - I don't care about OS X). I intend to work with lots of text. So, I've already read the refrence manual and I'm starting to explore the standard library and Lazarus library. But this made me think twice:
http://wiki.freepascal.org/FPC_Unicode_supportReally, I don't understand any of that, but this all sure sounds like bad news. Can you please give some examples of the following:
If a string with a static code page X1 is assigned to a string with static code page X2 and X1<>X2, the string data will generally first be converted to said code page X2 before assignment
Anyway, is there any difference between 'code page' and encoding in the Wiki's usage of these terms?
The dynamic code page is a property of the AnsiString which, similar to the length and the reference count, defines the actual code page of the data currently held by that AnsiString.
How does it 'define' 'code page' and what the compiler is actually DOING with that 'definition'?
Code page-aware strings are the only exception to this rule: concatenating two or more strings always occurs without data loss, although afterwards the resulting string will of course still be converted to the static code page of the destination (which may result in data loss).
Can you give some examples of concatenating strings with different 'code pages' without data loss and then losing data anyways?
I've searched this forum (and some others) and it seems lots of people have troubes with Unicode in Free Pascal. Some workarounds involve temporarily renaming files to ASCII (!), and then back... That's pretty mindboggling in 2014, to be frank. Maybe Free Pascal is simply not suitable for what I want to do.
Sorry if that sounds a little inflammatory. I understand that the Free Pascal team is working on Unicode support. Still, I have to figure out the state of string handling in FPC before I can proceed any futher with it.