You are not logged in.
Pages: 1
@AB - while implementing a nodeJS Buffer object (to be committed to SyNode) we discover a problem:
all TSynAnsiConvert.AnsiBufferTo* functions append a #0 to the end of Dest buffer. This is not good for our use cases - we need to modify a part of buffer and not break a rest.
Can I add a optional argument to the AnsiBufferTo* to prevent such behavior?
function AnsiBufferToUnicode(Dest: PWideChar; Source: PAnsiChar; SourceChars: Cardinal; ZeroTerminate: boolean = true): PWideChar; overload; virtual;
begin
...
if ZeroTerminate then result^ := #0;
end;
Offline
Please check http://synopse.info/fossil/info/e7239c9081
Offline
Thanks! The first check is OK..
Please, review the commit [86ecc83b65]- we add a REPLACEMENT CHARACTER (0xEF 0xBF 0xBD for UFT8) for unmathced surrogate pairs during RawUnicodeToUtf8
This version is pass nodeJS buffer tests, but may be you decide to rewrite in more "mORMot" way
Last edited by mpv (2016-09-12 15:22:53)
Offline
Offline
I add small changes - see http://synopse.info/fossil/info/7043499 … 71277de61d (and [81ebdcdf6d] - I don't understand how I rewrite your changes - looks like fossil merge not ideal)
Offline
Ups. This is not fossil merge - this is my Subversion. AB - let's merge a WinWebSocket & HTTPServerEvents to the trunk. This changes not break your code, but add a low-level HTTP.SYS based WebSockets (allow many WS client connections - we currently have near 5000 in production and WSS). Because I work in WinWebSocket brunch I can't use a fossil repo directly and need to copy mORMot to the my subversion repo. This complicates my life for every mORMot repo commit
Offline
I'm simplify condition for replacing unmatched surrogate pairs during RawUnicodeToUtf8 - please, see fix for FPC compiler. Delphi and FPC compiler unexpectedly differs for me...
Offline
Pages: 1