UnicodeFromLocaleChars/LocaleCharsFromUnicode mising
Original Reporter info from Mantis: EgonHugeist@ZeosLib
-
Reporter name: EgonHugeist@ZeosLib
Original Reporter info from Mantis: EgonHugeist@ZeosLib
- Reporter name: EgonHugeist@ZeosLib
Description:
Hello i'm sorry for entering this sensitive area again.
Sinze Zeos 7.2 i opened the ADO gate for FPC to.
Since Zeos 7.3 i added 3 new Protocols which are also for the FPC: OleDB-direct access, odbc_a (native raw version) and odbc_w a pure unicade based access driver.
Since a long time i miss the Delphi functionallity of these both functions:
function LocaleCharsFromUnicode(CodePage, Flags: Cardinal;
UnicodeStr: PWideChar; UnicodeStrLen: Integer; LocaleStr: PAnsiChar;
LocaleStrLen: Integer; DefaultChar: PAnsiChar; UsedDefaultChar: PLongBool): Integer;
function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
LocaleStrLen: Integer; UnicodeStr: PWideChar; UnicodeStrLen: Integer): Integer; overload;
All i have is a Windows define and use the MultiByteToWideChar/WideCharToMultiByte of Windows.
Performance is going to nuts this way. You may call it a feature request but from my POV it's a incompatibility issue.
Steps to reproduce:
No steps required
Additional information:
Dince DXE both functions have been introduced to have the conversion functions on all platforms. FPC Still have no comparable functionality except the WideStringManger functions. But the WideStringManager functions allways return a allocated string which i do not want to have. As long FPC MemoryManager still not achives the performance of FastMM4 (lack of implementation of all features FastMM4 provides) it's horeable to achive a good performance for W2Raw and vice versa conversion.
A nice example:
the T(Wide)StringField has a allocated buffer. ZeosDBO should fill the buffers with UTF8 or another raw CP dependent to the TZDataSetSettings. With FPC i'm endless forced to make a conversion into a (Unicode/Raw)String and than move the data.
With the delphi compilers i can make all conversions into the field buffers directly which keeps memory manager a bit more in idle state....
Mantis conversion info:
- Mantis ID: 29514
- OS: All
- OS Build: ALL
- Platform: All
- Version: 3.0.0