Hi Roger,
in last few days I worry with correct showing and writing our national characters
and translating some CXP code to CxpHttpServer(CHS).
1.
due to some problems with refreshing content of html page, I added clause NO-CACHE to index.html and in all created html file
- this workaround works in most cases, but sometimes when I click on „lelf-arrow“ pushbutton for showing previous page,
old/cached content is displayed
- try run example test04 and click on pb 6 or 666 and then on left arrow for navigatig back
- you will see that time was not changed
- when you click on pb a-7b, page/time is refreshed
- in this example I also try move/redirect/call to other method/function/page and also show some pb’s style and hover clause
- hmmm, I think there is also any parameter for SessionManager for enable/disable this behavior, is to possible add it into CHS if it will solve this?
2.
I added support for DbfCdx, because that format I use in windows desktop app and automatical start of CHS when it was started
- please, can you add this in your code too, I did not have to always do this – many thanks
- just note: FoxCdx must be set to default – recommendation from Alaska’s guys
3.
please, can you add exact procname, line number and passed parameters into error.log when any error occurs?
- try e.g. enable line 524 and re-run program – as you can see if there is more MemoWrit() I have no idea, where and what problem occurs
= Donnay Software Web Server Error ==========
Date: 20150415, Time: 20:12:04
App: c:\exp20\Samples\Web20\CxpHttpServer.EXE, Thread: 4
ERROR BASE/3
Parameter has a wrong data type: memoWrit
Called from WEBHANDLER:ONERROR(79)
Called from WEBHANDLER:EXECUTE(170)
Called from CUSTOMWEBHANDLER:EXECUTE(157)
Called from WEBHANDLERPROCESSOR:RUN(260)
Called from ABSTRACTHOSTADAPTOR:RUN(204)
Called from WEBJOB:EXECUTEWEBREQUEST(562)
Called from WEBJOB:EXECUTEHTTP(505)
Called from WEBJOB:EXECUTE(461)
4.
biggest problem I have with our national characters...
if data in database are filled with desktop app, indexing with your CHS and with desktop app works OK (not ok with CXP) – I use OEM CodePage 852 / Central-Europe / Latin-2
- note: some national chars are bad displayed
- just see test07 and image test-cdx-07.png
- but when I open in web-browser file test-8859-2.html – example 8b, it is showed OK! So with CHS it is possible do, with CXP not!
- also example test8a – if that same file are first readed into memory and then saved in html, result is wrong...
- also when I direct write any our characters into html file – e.g. examples test01, 02, 03 – it is not good...
- I think problem is how to write these chars in cxp/chs, because if it is written in any external html editor(like test-8859-2.html), it is ok
5. I added my replacement for your SendMail function
- MyMailerTestMsg works with MarshallSoft LIB
- if someone else are interested...
Zdeno
CxpHttpServer
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
CxpHttpServer
- Attachments
-
- test02c.zip
- (440.1 KiB) Downloaded 985 times
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: CxpHttpServer
Roger,
ok, I figured it! „nearly“...
Attached is updated test code.
When you run example test06b or test07b, it finally correctly shows our chars,
but only when I direct call created/saved html file test06b.html or test07b.html.
When cHtml content is displayed in webbrowser as return value of method/function,
our chars are „tranformed“ to any „&#nnn;“ codes... just see source or images.
Why? How is it possible turn this off?
TIA & Regards
Zdeno
ok, I figured it! „nearly“...
Attached is updated test code.
When you run example test06b or test07b, it finally correctly shows our chars,
but only when I direct call created/saved html file test06b.html or test07b.html.
When cHtml content is displayed in webbrowser as return value of method/function,
our chars are „tranformed“ to any „&#nnn;“ codes... just see source or images.
Why? How is it possible turn this off?
TIA & Regards
Zdeno
- Attachments
-
- test02d.zip
- (97.06 KiB) Downloaded 934 times
Re: CxpHttpServer
I don't know why it is doing that.
I have a program in which I create dynamic HTML and it displays correctly.
I will have to see if I get the same result.
I have a program in which I create dynamic HTML and it displays correctly.
I will have to see if I get the same result.
The eXpress train is coming - and it has more cars.
Re: CxpHttpServer
These are my results for Test06b.html
#1 Test06b.html sent directly from CxpHttpServer
cPath:c:\exp20\Samples\Web20\
Alias():TEST
00000005 Adamekova Aneta aa@drt.sw
00000025 Ádamekova Aneta aa@drt.sw
00000006 Bielik Andrej ba@abc.ks
00000026 Bielik Andrej ba@abc.ks
00000004 Bielik Tomas bt@aaa.net
00000024 Bielik Tomáš bt@aaa.net
00000001 Bielik Zoltan bz@bbb.sk
00000021 Bielik Zoltan bz@bbb.sk
00000002 Cacko Peter cacko@xyz-test.sk
00000022 Čacko Peter cacko@xyz-test.sk
00000003 Dezider Roman dez@aaa.com
00000023 Dezider Roman dez@aaa.com
00000007 Laco Martin lm1@a.a
00000027 Laco Martin lm1@a.a
00000010 lsctzyaieuaon ls1@x.x
00000030 ľščťžýáíéúäôň ls2@y.y
00000008 Mino Jeremias mj@b.b
00000028 Miňo Jeremiáš mj@b.b
00000009 Zvala Lukas zl@c.c
00000029 Zvala Lukáľ zl@c.c
#2 Test06b.html sent by MemoRead('Test06b.html')
cPath:c:\exp20\Samples\Web20\
Alias():TEST
00000005 Adamekova Aneta aa@drt.sw
00000025 Ádamekova Aneta aa@drt.sw
00000006 Bielik Andrej ba@abc.ks
00000026 Bielik Andrej ba@abc.ks
00000004 Bielik Tomas bt@aaa.net
00000024 Bielik Tomáš bt@aaa.net
00000001 Bielik Zoltan bz@bbb.sk
00000021 Bielik Zoltan bz@bbb.sk
00000002 Cacko Peter cacko@xyz-test.sk
00000022 Èacko Peter cacko@xyz-test.sk
00000003 Dezider Roman dez@aaa.com
00000023 Dezider Roman dez@aaa.com
00000007 Laco Martin lm1@a.a
00000027 Laco Martin lm1@a.a
00000010 lsctzyaieuaon ls1@x.x
00000030 ¾šèťžýáíéúäôò ls2@y.y
00000008 Mino Jeremias mj@b.b
00000028 Miòo Jeremiáš mj@b.b
00000009 Zvala Lukas zl@c.c
00000029 Zvala Luká¾ zl@c.c
Which of these is correct? #1 or #2
When I bring your test06b.html into Multiedit, it shows characters as in #2.
I know very little about how to deal with these issues as I usually work in the English language.
#1 Test06b.html sent directly from CxpHttpServer
cPath:c:\exp20\Samples\Web20\
Alias():TEST
00000005 Adamekova Aneta aa@drt.sw
00000025 Ádamekova Aneta aa@drt.sw
00000006 Bielik Andrej ba@abc.ks
00000026 Bielik Andrej ba@abc.ks
00000004 Bielik Tomas bt@aaa.net
00000024 Bielik Tomáš bt@aaa.net
00000001 Bielik Zoltan bz@bbb.sk
00000021 Bielik Zoltan bz@bbb.sk
00000002 Cacko Peter cacko@xyz-test.sk
00000022 Čacko Peter cacko@xyz-test.sk
00000003 Dezider Roman dez@aaa.com
00000023 Dezider Roman dez@aaa.com
00000007 Laco Martin lm1@a.a
00000027 Laco Martin lm1@a.a
00000010 lsctzyaieuaon ls1@x.x
00000030 ľščťžýáíéúäôň ls2@y.y
00000008 Mino Jeremias mj@b.b
00000028 Miňo Jeremiáš mj@b.b
00000009 Zvala Lukas zl@c.c
00000029 Zvala Lukáľ zl@c.c
#2 Test06b.html sent by MemoRead('Test06b.html')
cPath:c:\exp20\Samples\Web20\
Alias():TEST
00000005 Adamekova Aneta aa@drt.sw
00000025 Ádamekova Aneta aa@drt.sw
00000006 Bielik Andrej ba@abc.ks
00000026 Bielik Andrej ba@abc.ks
00000004 Bielik Tomas bt@aaa.net
00000024 Bielik Tomáš bt@aaa.net
00000001 Bielik Zoltan bz@bbb.sk
00000021 Bielik Zoltan bz@bbb.sk
00000002 Cacko Peter cacko@xyz-test.sk
00000022 Èacko Peter cacko@xyz-test.sk
00000003 Dezider Roman dez@aaa.com
00000023 Dezider Roman dez@aaa.com
00000007 Laco Martin lm1@a.a
00000027 Laco Martin lm1@a.a
00000010 lsctzyaieuaon ls1@x.x
00000030 ¾šèťžýáíéúäôò ls2@y.y
00000008 Mino Jeremias mj@b.b
00000028 Miòo Jeremiáš mj@b.b
00000009 Zvala Lukas zl@c.c
00000029 Zvala Luká¾ zl@c.c
Which of these is correct? #1 or #2
When I bring your test06b.html into Multiedit, it shows characters as in #2.
I know very little about how to deal with these issues as I usually work in the English language.
The eXpress train is coming - and it has more cars.
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: CxpHttpServer
#1 is OKWhich of these is correct? #1 or #2
When I open created/generated html file from cHtml in any program or web-browser or in direct in CxpHttpServer,When I bring your test06b.html into Multiedit, it shows characters as in #2.
it is OK, just see also attached images test06b-04---OK.png and test-nc-06b-02---OK.png,
it shows correct that file in ConText, in Windows Notepad and Total Commander Viewer...
BUT it is BAD / WRONG displayed in CxpHttpServer, when it is returned back to web-browser window as Return value cHtml
METHOD MyTest01:Text06b()
...
RETURN cHtml
see attached image test-nc-06b-01---WRONG.png
and as you can see in this image on the right side, some our chars are „for some reason“
before displaying in web-browser window changed in source code to „&#nnn;“ codes...
A -> „Á“
C -> „È“
etc...
so, problem is NOT in generated cHtml (see previous sections), but may be in their automatic internal conversion… or some bad settings
Please, I kindly ask you, can you ask Steffan, how is is possible TURN-OFF „transforming“ chars or if it bug in Xbase++? Or mine?I know very little about how to deal with these issues as I usually work in the English language.
Many thanks
Zdeno
- Attachments
-
- test06b-04---OK.png (90.33 KiB) Viewed 16524 times
-
- test06b-03.png (160.01 KiB) Viewed 16524 times
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: CxpHttpServer
next images
- Attachments
-
- test-nc-06b-02---OK.png (106.89 KiB) Viewed 16521 times
-
- test-nc-06b-01---WRONG.png (109.27 KiB) Viewed 16521 times
-
- Posts: 147
- Joined: Thu Jan 28, 2010 9:24 am
- Location: Nitra, Slovakia
- Contact:
Re: CxpHttpServer
Hi,
if someone is interesting, I made this „workaround“ for now:
before end of METHOD MyTest01:Text06b() I added this code
and now in web-browser are displayed our nationals chars OK...
...
if someone is interesting, I made this „workaround“ for now:
before end of METHOD MyTest01:Text06b() I added this code
and now in web-browser are displayed our nationals chars OK...
...
MemoWrit('test06b.html',cHtml) && ok, first save actual cHtml
wtf cHtml
*
* and then create NEW temp html, which just shows created/saved html file
* so, not direct original cHtml is sended back to browser, but this short "help/temp" version
cHtml := '<html>' + CRLF
cHtml += '<head>' + CRLF
cHtml += '<meta content="text/html; charset=windows-1250" http-equiv="content-type">' + CRLF
cHtml += '<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">' + CRLF
cHtml += '</head>' + CRLF
cHtml += '<body>' + CRLF
cHtml += '<script language="javascript" type="text/javascript">' + CRLF
cHtml += ' window.location.href=' + "'" + '/test06b.html' + "' ;" + CRLF
cHtml += '</script>' + CRLF
cHtml += '</body>' + CRLF
cHtml += '</html>' + CRLF
* MemoWrit('test06bNew.html',cHtml) && just for "test/control"
wtf cHtml
*
RETURN cHtml
*