Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 Problems with Greek characters when run on SQL
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Largo
Starting Member

Greece
16 Posts

Posted - 26 March 2005 :  03:22:02  Show Profile
Hello.

I have a rather strange problem. I was testing snitz forums on our hosting server using Access and i had no problem at all. Today we decided to install and try to use it for our clients support in SQL 2000.

To our surprise the Greek data from SQL appears as junk. The messages from the language file appear ok.

We host to a non Greek local server with Windows 2003.

Any ideas why this happens and how we could overcome it ?

Thanks

Costas

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 26 March 2005 :  06:59:31  Show Profile  Send ruirib a Yahoo! Message
What happens with new posts in Greek? Do they show correctly?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Largo
Starting Member

Greece
16 Posts

Posted - 26 March 2005 :  10:35:36  Show Profile
quote:
Originally posted by ruirib

What happens with new posts in Greek? Do they show correctly?



No they do not.They appear like garbage. I've been talking to our hosting provider. The collation of the SQL server we use is UK. BUT they told me i can force an other collation when i CREATE the database. I don't know how but it is described here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da_3zw3.asp

I dunno if this will solve the problem but it will be worth trying it. If you have any ideas how to do that with snitz, please let me know.

Thanks

Costas
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 26 March 2005 :  19:04:42  Show Profile  Send ruirib a Yahoo! Message
Nah, that alone won't do it. Read this post and follow the link to other posts contained in it: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=33824&SearchTerms=,utf-8


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Largo
Starting Member

Greece
16 Posts

Posted - 27 March 2005 :  04:53:39  Show Profile
quote:
Originally posted by ruirib

Nah, that alone won't do it. Read this post and follow the link to other posts contained in it: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=33824&SearchTerms=,utf-8



What do you mean "that alone won't do it", you mean that i could help ? Is that hard to do with the setup of snitz ?

We had a similar problem a while ago with an other asp softare, and the author provided a separate read/write function we replaced in the software (because we had also displaying problems).

The write function maybe could be transfered to snitz. We will have to talk to some asp programmer. The function is:

Sub WriteGreekText (psFile, psText)
Dim objStream
Set objStream = CreateObject("ADODB.Stream")

objStream.Type = 2 'adTypeText

'If Len(CharSet) > 0 Then
objStream.CharSet = "windows-1253"
'End If

objStream.Open
objStream.WriteText psText

objStream.SaveToFile psFile, 2 'adSaveCreateOverWrite
objStream.Close
set objStream = Nothing
End Sub

--

Costas


Edited by - Largo on 27 March 2005 05:29:51
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2005 :  07:27:54  Show Profile  Send ruirib a Yahoo! Message
Saving your .asp file in UTF-8, using the 65001 code and setting the charset to utf-8, as explained here should fix the issue.

My understanding is that the collation to be used is only relevant for the sorting of Unicode characters, and since Snitz text fields in the latest version are unicode, no other aspects are influenced by the collation. So it seems to me that one solution, and the most common one in ASP apps, is the one I posted before. You can even test it before saving Snitz files in UTF-8. You'll get garbled page content for the page strings, but the posts should be shown correctly. Once that happens the only thing need is to save the files in UTF-8.


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 27 March 2005 07:29:17
Go to Top of Page

Largo
Starting Member

Greece
16 Posts

Posted - 27 March 2005 :  08:15:14  Show Profile
quote:
Originally posted by ruirib

Saving your .asp file in UTF-8, using the 65001 code and setting the charset to utf-8, as explained here should fix the issue.

My understanding is that the collation to be used is only relevant for the sorting of Unicode characters, and since Snitz text fields in the latest version are unicode, no other aspects are influenced by the collation. So it seems to me that one solution, and the most common one in ASP apps, is the one I posted before. You can even test it before saving Snitz files in UTF-8. You'll get garbled page content for the page strings, but the posts should be shown correctly. Once that happens the only thing need is to save the files in UTF-8.



I will try this right now. Where do i have to put

<% Session.Codepage =65001
Response.Charset="utf-8"
%>

is the default.asp sufficient ?

Also can you help me explaining how i could try this

"Then for every "dynamic" string that uses Unicode chars, use Response.Write to output it, automatically converting it from Unicode and UTF-8."

Thanks

Costas

Edited by - Largo on 27 March 2005 08:52:35
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2005 :  10:17:33  Show Profile  Send ruirib a Yahoo! Message
You can insert it at the top of inc_header.asp. Don't worry about the phrase on dynamic string, since that is already done in the SNitz code.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Largo
Starting Member

Greece
16 Posts

Posted - 27 March 2005 :  12:40:07  Show Profile
Just finshed the testing, following your suggestions. I'm sorry to say that it doesn't work. Postings still appear as ??? and now also the strings from the language file appear as garbage (but not as ???).

The problem is that we host on a NON Greek SQL server.

Strange is that Access works like a charm.

Costas

Edited by - Largo on 27 March 2005 12:44:28
Go to Top of Page

Largo
Starting Member

Greece
16 Posts

Posted - 27 March 2005 :  13:00:55  Show Profile
This getting very strange. Just made a posting here at the TEST forum, using Greek.

It shows very well, with no problems.

I will start to pull my hair out...

Costas
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2005 :  13:04:08  Show Profile  Send ruirib a Yahoo! Message
What do you see when you query the database using SQL Server tools (Query Analizer, Enterprise Manager)?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Largo
Starting Member

Greece
16 Posts

Posted - 27 March 2005 :  13:33:50  Show Profile
quote:
Originally posted by ruirib

What do you see when you query the database using SQL Server tools (Query Analizer, Enterprise Manager)?



What should i query ?

Costas
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2005 :  14:25:50  Show Profile  Send ruirib a Yahoo! Message
You should query the topics tables and the replies tables, to try to retrive messages with Greek contents.


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 27 March 2005 14:28:07
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07