#1 2022-09-03 23:59:38

bigheart
Member
Registered: 2014-08-01
Posts: 53

What is the length(FAVICON_BINARY)

Hello,

in mormot.rest.http.server unit of mormot2, there is a code as below at 1568 line.

initialization
  assert(length(FAVICON_BINARY) = 510);

But in my environment (Win10, Delphi XE5) length(FAVICON_BINARY) is 491.

Please let me know which means the above assert(...) and why check the length?

Offline

#2 2022-09-04 09:00:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,620
Website

Re: What is the length(FAVICON_BINARY)

I have no problem on my PC.

What is your system code page ?

Offline

#3 2022-09-05 01:57:41

bigheart
Member
Registered: 2014-08-01
Posts: 53

Re: What is the length(FAVICON_BINARY)

My system's code page is 949.

Offline

#4 2022-09-05 14:06:25

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,620
Website

Re: What is the length(FAVICON_BINARY)

This is a typical code page bug of Delphi....

Please try https://github.com/synopse/mORMot2/commit/c89c5632
I have use base-64 encoding, so it should work fine on all systems.

Sorry for the inconvenience.

Offline

#5 2022-09-06 00:39:22

bigheart
Member
Registered: 2014-08-01
Posts: 53

Re: What is the length(FAVICON_BINARY)

It works well.

Thanks ab.

Offline

Board footer

Powered by FluxBB