Recent

Author Topic: Unicode wiki clarification questions  (Read 4448 times)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Unicode wiki clarification questions
« on: July 23, 2011, 09:48:48 am »
In my struggles with Unicode I've read the LCL Unicode support wiki page:
http://wiki.lazarus.freepascal.org/LCL_Unicode_Support#Widestrings_and_Ansistrings

Questions:
1. Widestrings and Ansistrings section: nowhere does it say what a widestring is, but it implies a UTF16 encoded Unicode string. Is that correct? If so, I'll add it to that section.
Update: I suppose Widestring is managed by the widestring manager on each platform, so it depends. On Windows, it's UTF16?
2. FPC is not Unicode aware section: the FCL and RTL are note unicode aware according to the wiki. But obviously the string type IS unicode aware (and, based on 1, also the Widestring type). Is that correct? Is a string always UTF8 encoded or does it depend on compiler switches - I can imagine that the shortstring compiler switch (forgot the name) leads to ANSI encoded strings...
3. Instructions for users section: "Usually the encoding is per-library (e.g. a dynamic library dll or a lazarus package)". Maybe a stupid question, but how can you tell whether a Lazarus component or package supports unicode? Go hunting through the source code for comments?

Thanks,
BigChimp

<modified with some guesses/suspicions>
« Last Edit: July 24, 2011, 11:30:29 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018