Author |
Topic |
|
Largo
Starting Member
Greece
16 Posts |
Posted - 26 March 2005 : 03:22:02
|
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 |
|
Largo
Starting Member
Greece
16 Posts |
Posted - 26 March 2005 : 10:35:36
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Largo
Starting Member
Greece
16 Posts |
Posted - 27 March 2005 : 04:53:39
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 27 March 2005 : 07:27:54
|
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 |
|
|
Largo
Starting Member
Greece
16 Posts |
Posted - 27 March 2005 : 08:15:14
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Largo
Starting Member
Greece
16 Posts |
Posted - 27 March 2005 : 12:40:07
|
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 |
|
|
Largo
Starting Member
Greece
16 Posts |
Posted - 27 March 2005 : 13:00:55
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Largo
Starting Member
Greece
16 Posts |
Posted - 27 March 2005 : 13:33:50
|
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 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
|
Topic |
|