Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - UTF-8 - MemberAPI and more
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UTF-8 - MemberAPI and more

 Post Reply Post Reply Page  12>
Author
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Topic: UTF-8 - MemberAPI and more
    Posted: 14 August 2008 at 4:11pm
Hi together,

long time ago - but i am still here with a new question.

Installed and using WWF in version 9.05 with member API. No probs so far. But know we  also have chinese and other foreign languages on board.

1.)  In the member API the authentification is going through the existing Sessions we have (USERNAME and PASSWORD). When the user is coming the first time to the forum - a new author will be created. The username session variable we show up at the page (header.asp) already on an other position - thats ok. But by creating a new user in tblAuthor the username will be stored like this:

和平Name = ??Name

So - the value of the session is utf-8 - but this will not going into the tblAuthor auf wwf.
Any Help around?

2.) Topics are stored as UTF-8 but the message content not. Is "text" also utf-8 like nvarchat(xyz) for MS-SQL Server? (we use 2005)


(I went through the release notes to check if there where some utf-8 related updates. Did not found them).

OK - would be nice if somebody can have a look on it.
Sebastian

UPDATE/Add. information:
Yes,  in setup_options_in.asp i have  Const strPageEncoding = "utf-8"




Edited by efscl - 02 September 2008 at 9:29am
Back to Top
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 9:30am
Sorry - if i ask again. Any hints/advices around?

thank you very much
Sebastian

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 11:09am
Try changing the LCID locale for the ASP pages. See the following page for more info:-

http://www.webwiz.net/kb/asp_knowledgebase/date_time_settings.asp

The reason text is used and not nText is for backward compatibility with previous versions. When the SQL Server version was introduced most web hosts used SQL Server version 7 which didn't support nText or nvarchar. If it were to be changed now it would break all those upgrading from previous releases. Not using nText and nvarchar shouldn't make any difference though and would not stop the forum from running.
Back to Top
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 11:40am
Hi Bruce,

thank you for your feedback. "text/ntext" i ok for me.

But i can not work with LCID other than uft-8 because of we have user from great britian and users from china using the same forums.

Thing is that storing the subject of the message is ok! but the username and message body is not working as utf-8.

We using member API and the session is stored in UTF-8 Format. This one is working. But a chinese username will not be stored correctly in the forum database when the user is coming to the forum via the member API.

Any other ideas? only the username and message body has the problem. Subject of a post is working great.

thx for the great app and best regards
Sebastian
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 11:59am
Sorry I don't have any other suggests for this type of multiple language/character set setup.
Back to Top
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 1:08pm
thanks anyway - i will try to solve this for myself. Message of a new topic is already working. This is what i have done:

Process is like this:
new_topic_form.asp
 => Form to new_post.asp
=> line 151 - still UTF-8
=> line 395 - still UTF-8
=> line 519 - still UTF-8
=> line 792 - still UTF-8

- so it must be on the database or the sql statement.

Action: Changed for "message" table "tblThread" the data type from old: text
to new: ntext

Result: Message of a new topic will be stored correctly as utf-8 ! Clap

Will keep you upToDate with the memberAPI. (username is not going as utf-8 into the database.

regards
Sebastian
Back to Top
efscl View Drop Down
Newbie
Newbie


Joined: 13 May 2007
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote efscl Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 3:50pm
Hi Bruce,

found the reason - but do not know the solution:

in functions/functions_member_API.asp we added at line 393 (after executing the sql-insert statement for a new user) an response.write strSQL and a response.end()

Result:
  1. the page is showing up as an UTF-8 page
  2. The SQL Statement is correct like ".... 和平Techi ..." (value of the strUsername)
  3. but in the database the value of the username results in an "??Techi"

Any idea? Im testing further....
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2008 at 5:46pm
The file uses an SQL INSERT query, maybe try using ADO to insert the data into the database.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.