NetTalk Central

Author Topic: Charset?  (Read 1866 times)

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Charset?
« on: November 25, 2020, 07:46:20 PM »
Hi Bruce,

I have hybrid application that runs Desktop and Web Server on the same TPS database. It always worked fine using Secwin.

But with NT 11.44 I upgraded Desktop application as usual and it's running ok but Web Server in SecwinWebLoginForm didn't worked simply closing on *any* input right or wrong user credentials returning to IndexPage withou showing any message. I tried traces in many ponts in SecwinWebLoginForm and seems that I didn't processed any login request in any pont before and after login.

Comparing with web51 example I've noticed that on Web Server settings charset is utf-8 and store data is utf-8 too running ok. Documentation says that store data shouldn't be utf-8 because Web Server can't show correct page code. Is that still correct?

But when I change my application from store "portuguese" to utf-8 Login start to work again but it does not recognizes *any* user denying login and presenting odd characters in the pages when I have accentuation because of charset. So I've returned back storage data to "portuguese" and remains the same allowing login but don't recognizing any user on the same dssw5.tps file that works ok with Desktop application. User names and passwords don't have any latin character.

I'm still using Clarion 8 and I know that it could be a problem but is there any turn around for now?

Thank you.

Marcos

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: Charset?
« Reply #1 on: November 25, 2020, 08:40:19 PM »
Hi Marcos,

>> But with NT 11.44 I upgraded Desktop application as usual

what version did you upgrade _from_ ?

>> Documentation says that store data shouldn't be utf-8 because Web Server can't show correct page code. Is that still correct?

It's hard to comment on documentation without a link to where you are reading it. Context is everything, and so out of context it's hard to say if a statement is true or not.

Generally speaking setting store-as to utf-8 is not ideal in Clarion 11 and below because (extended ansi) data stored as utf-8 cannot be displayed on a Clarion window or report. So generally I advise against setting store-as to utf-8 for old clarions.

>> But when I change my application from store "Portuguese" to utf-8 Login start to work again.

that is somewhat surprising since I would not expect this to have any material effect on the login. It's possible something else is in play...

My initial 2 guesses are;

a) you have the login screen open in your browser, and then you are stopping (compiling?) starting the server. That login screen will then fail (because the server doesn't know what you are looking at.)

b) In the login procedure there is a call to SetSessionLoggedIn(false). This line can clash with a security setting (change SessionId on log in/out). So if you have this line, comment it out.

cheers
Bruce




Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Charset?
« Reply #2 on: November 26, 2020, 04:32:13 AM »
Hi Bruce,

>>what version did you upgrade _from_ ?

Was 11.35 and today updated to 11.47.

>> Generally speaking setting store-as to utf-8 is not ideal in Clarion 11 and below because (extended ansi) data stored as utf-8 cannot be displayed on a Clarion window or report. So generally I advise against setting store-as to utf-8 for old clarions.

It's on "Capesoft/NetTalk/NetTalkWebFunctionality.htm" "Web Server Procedure Extension" describing "Advanced Tab". Ok.

 Web51 example is working even with store data as utf-8 or portuguese.

>> a) you have the login screen open in your browser, and then you are stopping (compiling?) starting the server. That login screen will then fail (because the server doesn't know what you are looking at.)

Initially I was closing tab, reopened and test but when trying traces end up compiling and starting server with screen opened. Now I'm closing browser, open new tab and test.

>> b) In the login procedure there is a call to SetSessionLoggedIn(false). This line can clash with a security setting (change SessionId on log in/out). So if you have this line, comment it out.

There's one call on "Generate Form" routine, but it doesn't make any difference.

Before calling ds_LogInUser all UserLoginOptions are correct but result is zero that I suppose that it didn't found the user. Is Charset could affect GUID in dssw5.tps?

Thank you.

Regards,

Marcos

« Last Edit: November 26, 2020, 04:35:11 AM by Sibuya »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: Charset?
« Reply #3 on: November 30, 2020, 09:47:40 PM »
Hi Marcos,

I think you will need to make an example app so I can test here.

Cheers
Bruce