[fpc-devel] Unicode resource strings
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Aug 20 19:42:44 CEST 2012
Mark Morgan Lloyd schrieb:
> I've got a couple of terminal emulators using WideChar and WideString
> for internal manipulation, what /should/ I be using? and where does it
> leave things like Sorokin's regex unit, which similarly use WideChar and
> WideString?
Depends on which libraries you use. AFAIK SBCS RegEx works for both Ansi
and UTF-8 strings, so that an UTF-16 library is optional. For the
terminal emulators I'd think that it's sufficient to introduce an
internal string type that allows to switch between UTF-8 and UTF-16, so
that the (different?) behaviour can be tested. When there exist
differences, this indicates that the WideString emulators *only* handle
Unicode BMP characters, not surrogate pairs, and you have to decide
whether this restriction is okay for you.
DoDi
More information about the fpc-devel
mailing list