We are using MSSQL 2008 for db.


Connection type is ODBC.



Driver Version is 6.01.7601.17514





From: Robert Shubert [mailto:rshub...@tronics.com]
Sent: Friday, February 22, 2013 5:32 PM
To: TeraScript-Talk@terascript.com
Subject: RE: TeraScript-Talk: UTF-8



John,



The question marks are coming from somewhere, and I think it might be from the 
database driver. Could you tell me you database, connection type (ODBC/JDBC) 
and driver  - include versions please. What we want TeraScript to do is read 
the database from the database as if its binary.



Robert



From: John Muldoon [mailto:webd...@cipromo.com]
Sent: Friday, February 22, 2013 3:31 PM
To: TeraScript-Talk@terascript.com
Subject: RE: TeraScript-Talk: UTF-8



“To answer your question directly, if you have a database with UTF-8 data in 
it. You are able to select from that database using TeraScript and then output 
that column data directly into the web page using @COLUMN. This should work as 
expected. Again, you can’t transform the data in any real way, but you can 
output it.”



We have tried this and it does not work. We can see the data in the DB 
correctly. We can also send it through an email app we put together and it 
sends the text correctly, it just does not display through a taf file. Is there 
anything else we need to do?



http://garyfinkbook.com/tests/charactertest.taf



Here is a test page loading text directly from the db.



Finally, you need to tell the webpage that it contains UTF-8 data. This means 
placing the <meta http-equiv=”content-type” content=”text/html; charset=UTF-8”> 
tag on your webpage. (for HTML5 it’s just <meta charset=”UTF-8”>). 
Alternatively, you can alter the HTTPHEADER such that the Content-Type: header 
element contains the “; charset=UTF-8” portion.



Yes… the <meta http-equiv=”content-type” content=”text/html; charset=UTF-8”> is 
in the header.











From: Robert Shubert [mailto:rshub...@tronics.com]
Sent: Friday, February 22, 2013 1:52 PM
To: TeraScript-Talk@terascript.com
Subject: RE: TeraScript-Talk: UTF-8



John,



Using Witango/TeraScript with Unicode is tricky. There will be some situations 
where it just won’t do the right thing. Version 8 will finally correct this 
shortcoming.



The @CIPHER tag does have an undocumented (lightly documented?) function to 
ENCODE and DECODE to between the native 8859-1 and UTF-8 encoding.



TeraScript can only operate on 8859-1 strings. So let’s say, for example, you 
wanted to read file stored in UTF-8 and then use @TOKENIZE on it. You would 
have to first read the file (raw data) then run that variable through @CIPHER 
to transform it’s encoding to 8859-1, and then @TOKENIZE it.



Keep in mind that 8859-1 has a lot fewer characters in its set then UTF-8, so 
this process could lose data.



To answer your question directly, if you have a database with UTF-8 data in it. 
You are able to select from that database using TeraScript and then output that 
column data directly into the web page using @COLUMN. This should work as 
expected. Again, you can’t transform the data in any real way, but you can 
output it.



Finally, you need to tell the webpage that it contains UTF-8 data. This means 
placing the <meta http-equiv=”content-type” content=”text/html; charset=UTF-8”> 
tag on your webpage. (for HTML5 it’s just <meta charset=”UTF-8”>). 
Alternatively, you can alter the HTTPHEADER such that the Content-Type: header 
element contains the “; charset=UTF-8” portion.



So the two parts of the puzzle are to place UTF-8 encoded data on the webpage, 
and then telling the webpage that’s the encoding to use.



Let me know if you’d like me to look at a webpage that isn’t encoding 
correctly, or for more information on the use of @CIPHER to do these 
transcodings.



Robert









From: John Muldoon [mailto:webd...@cipromo.com]
Sent: Wednesday, February 20, 2013 8:43 AM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: UTF-8



Hi folks,



I have been reading past mail archives for Tera and Wi and found some 
references to the <@cipher> tag on encoding and decoding UTF-8 characters. We 
have been able to get the database to show UTF-8 properly but was wondering on 
what the correct syntax would be to display the data on the return of a taf 
file. Possibly any other thoughts on getting this to work correctly. We were 
able to use an email function in the DB itself to email UTF-8 characters, but 
was also wondering about the Email in Tera and what caveats I need to address 
to get this to work properly.



Thanks!





  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.




----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to