Commit Graph

3 Commits

Author SHA1 Message Date
Jonas Maebe
f4c31ecf3c + widestringmanager.codepointlengthproc added, which can be used to
determine the length of a multi-byte character. The return values
    are defined to be the same as those of POSIX' mblen: -1 =
    invalid/incomplete sequence, 0 = #0, > 0 = length of sequence in
    bytes.
  + default implementation for widestringmanager.codepointlengthproc
    (assumes all code points have length 1) and Unix implementation
    (based on mb(r)len); Windows implementation is still required
  * replaced default implementation of
    widestringmanager.CharLengthPCharProc with strlen() of the input
    instead of an error (correct if all code points have length 1,
    still needs Windows implementation)
  + implemented fpc_text_read_{wide,unicode}str() and
    fpc_text_read_widechar() (mantis #18163); fpc_text_read_widechar()
    uses the new widestringmanager.codepointlengthproc()
  + unicodestring support for readstr/writestr
  * fixed declaration of fpc_Write_Text_UnicodeStr (unicodestring
    instead of widestring parameter)
  * extended test/twide*.pp tests to test the new/fixed functionality

git-svn-id: trunk@16533 -
2010-12-10 14:10:01 +00:00
Jonas Maebe
01592d7b5d * don't convert terminating #0 of UCS4Strings to widestring
* fixed length check in twide5.pp

git-svn-id: trunk@9518 -
2007-12-23 18:40:15 +00:00
Jonas Maebe
2319d8c3ce * fixed WideStringToUCS4String and UCS4StringToWideString for code points
requiring surrogate pairs in utf-16 + test

git-svn-id: trunk@9391 -
2007-12-05 13:05:09 +00:00