NetTalk Central

Author Topic: 8.09 mobile chars  (Read 5688 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
8.09 mobile chars
« on: April 22, 2014, 02:32:08 AM »
In mobile mode áéíóúñ,etc are shown as <?>
See image
Thanks

[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 8.09 mobile chars
« Reply #1 on: April 22, 2014, 04:14:37 AM »
all depends on your settings. I recommend you post an example.

cheers
Bruce

urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: 8.09 mobile chars
« Reply #2 on: April 22, 2014, 05:29:30 AM »
michelis

In my case to have Spanish characters i use in the NetTalk Simple Object in the advance tab the following options

Charset: 'ISO-8859-1'
Store Data As:  UTF-8


At least for me do the trick to have all the characters in a correct way.

Cheers

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 8.09 mobile chars
« Reply #3 on: April 22, 2014, 05:44:15 AM »
Because spanish chars are "in" the extended ASCII set this works. However a better approach would be;

charset: utf-8
Store As : Spanish

But then, depending on your context, you may need to convert "hard coded strings" - which is why Alberto you need to post an example. In other words if the text in your app is _not_ utf-8 then it should be passed through the Translate method to make it into Utf-8 before including on a web page.

cheers
bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: 8.09 mobile chars
« Reply #4 on: April 22, 2014, 09:02:36 AM »
I know is better to post an example but when you have a very large app and over sql server it is really a pain.

Al my strings are passed trough the transalte method.

I use 'ISO-8859-1' and Spanish

All of them works ok in Desktop mode but works like in the image in mobile mode without changing any setup.

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 8.09 mobile chars
« Reply #5 on: April 22, 2014, 10:37:48 PM »
I didn't suggest you post your app here. I don't want your app - that's too big.
I want an _example_ of what you are doing that shows the effect.

In other words, take one of the shipping examples, add some code or whatever to show the effect and then post that.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: 8.09 mobile chars
« Reply #6 on: April 24, 2014, 03:08:16 AM »
Ok, I´ve made an example.
I use the ImageMap example, from the web3 example
I´ve added
-a display string at the top of the form
-the translate routine in the webhandler
-the translat.tps file
zip file attached

In my app I´m using
Charset: 'ISO-8859-1'
Store Data As:  Spanish

Steps to reproduce:
Browse. press "modificar" in any row.
_mobile_=0    OK (Image 1)
Then I change _mobile_=1 without changing the page and it is shown OK... (Image 2)
Then I press cancel to go back to the browse and "modicar" again (Change) and then you can see the <?> replacing the spanish chars (Image 3)
back to _mobile_=0 and all is OK again

Thanks



[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 8.09 mobile chars
« Reply #7 on: April 27, 2014, 11:58:00 PM »
Hi Alberto,

I already told you to change to

charset: utf-8
Store As : Spanish

Here's a shock - that makes it work.....

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: 8.09 mobile chars
« Reply #8 on: April 28, 2014, 04:03:21 AM »
Ok, I´ve change it to utf-8 but there´s a new problem.

The app has a NetWebPage called IndexPage as Default Page.

In the XHTML tab it calls a static html page using :  <!-- Net:f:index.html -->

When you enter the site the first time (NTWS servs the default page), now all áéíóú...ñ appears as <?>
You can see it in www.doctoranyplace.com.ar

If you call the index page trhoug the browser www.doctoranyplace.com.ar/index.html , or clicking the Home link in the same page, the characters are shown ok.

I´ve tried cheking the utf8 enconded in the IndexPage proc but still the same problem.

How to solve it?
Thanks
« Last Edit: April 28, 2014, 04:17:00 AM by michelis »
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: 8.09 mobile chars
« Reply #9 on: April 28, 2014, 11:17:53 AM »
Ok, I solved it setting:

    p_web.site.HtmlCharset = lower('ISO-8859-1')   before CODE

and then going back to

    p_web.site.HtmlCharset = 'utf-8'

before return

Any idea of what the problem is?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 8.09 mobile chars
« Reply #10 on: April 28, 2014, 10:58:31 PM »
>> Ok, I solved it setting:

your solution is very bad.

>> Any idea of what the problem is?

you are not listening to what you're being told to do - and then moving forward from there. You best solution is to apply the answers you are given, and then follow up from there to address any side-effects you encounter.

>> In the XHTML tab it calls a static html page using :  <!-- Net:f:index.html -->

I presume you mean it calls an HTML _snippet_ - calling an actual page makes no sense there - if it was a complete page then just let the server serve it as a static file.

If it is a snippet, then it needs to be saved from your text editor in utf-8 format, since it will be included on a utf-8 page.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: 8.09 mobile chars
« Reply #11 on: April 29, 2014, 02:11:30 AM »
Bruce,
I AM listening, I chenge my settings to utf-8 as you told.

And I get this side effect.

"calling an actual page makes no sense there - if it was a complete page then just let the server serve it as a static file."

how do I do it? the NTWS will serve it without seting nothing on it?
which page will then be the initial page on the NTWS?
if I change it, why the NTWS will serve the index.html instaed of the default initial page?

Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 8.09 mobile chars
« Reply #12 on: April 29, 2014, 02:32:38 AM »
Hi Alberto,

>> how do I do it?

nothing to do. put the HTML file in the web folder, and then simply call it by name in the address bar (or from any URL link.)
For example, if the file bruce.htm is in the web folder, then you can do
http://127.0.0.1:88/bruce/htm

>>  the NTWS will serve it without seting nothing on it?

correct.

(You can make it "parse" the page as well if you like - but that's another discussion)

>> which page will then be the initial page on the NTWS?

simply use that page name (and extension.) So If the "Default Page" setting is
'bruce.htm' then that's the page which will be served as the default.

>> if I change it, why the NTWS will serve the index.html instaed of the default initial page?

There is no "default initial page" procedure. there's only the "Default Page" Setting in WebServer. And that's just a URL - it's not bound to any procedure.

(Note that your indexPage procedure may have the Page Name set as Index.HTM. In which case it will override any static file called Index.Htm )

All of this is true - but also is all (usually) not recommended. It's much better to include _snippets_ inside an Indexpage procedure, not a whole page, but hand-coded snippets which are included on the page using <!-- Net:f:something -->

(These snippets should then be saved as utf-8 )

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: 8.09 mobile chars
« Reply #13 on: April 29, 2014, 02:39:51 AM »
I simply cant do this.
When you promote a syte you simply tell the user an URL plain and simple

www.doctoranyplace.com.ar

I cant tell the user to type or to use

www.doctoranyplace.com.ar/index.html

I need the server to serve an initial static web html syte to show how the syte works and then from some page go to the dynamic Login page to begin to work.
-----------
Regards
Alberto