Well… I did find a way to display Chinese though it is not as eloquent as I 
would want, but it does work. If you use a Chinese keyboard (or cut and paste 
Chinese characters) in an input form, it appears that Witango and Tera 
automatically changes the characters to HTML ASCII. I set a column in MSSQL to 
varchar(max) and then call the column back into Tera and wouldn’t you know it… 
Chinese! I also tested this in emails and get the same results. A work around 
for any who are interested.









From: MC Tay [mailto:[email protected]]
Sent: Monday, February 25, 2013 3:37 PM
To: [email protected]
Subject: RE: TeraScript-Talk: UTF-8



Not sure if this is a related after reading the following email thread recently.

We are still using WiTango 6x. We have  <meta http-equiv=”content-type” 
content=”text/html; charset=UTF-8”> on all our taf files, and we will be able 
to enter foreign languages through form, store them in Oracle database, and 
output the foreign language on the taf web pages correctly.

In order to display the foreign language on the webpage (client''s desktop), 
the only thing that we have to configure is the "Regional and Language Options" 
in the Windows control panel and enable the languages that you want.

Hope that helps.

MC


At 02:10 PM 2/25/2013, you wrote:



John,

My setup is very similar. After doing some testing, I couldn’t get it to work 
correctly. It seems that might be possible if you use the Binary column type, 
but I wasn’t able to get it to work. I think there’s some translation being 
done when TeraScript reads the database off the connection, which is preventing 
the character data from coming through correctly.

I’ll continue to work on the issue and see if I can find a work around for 
version 7. I fully expect that version 8 will support UTF-8.

Robert

From: John Muldoon [ mailto:[email protected] <mailto:[email protected]> ]
Sent: Monday, February 25, 2013 9:58 AM
To: [email protected]
Subject: RE: TeraScript-Talk: UTF-8

We are using MSSQL 2008 for db.

Connection type is ODBC.

Driver Version is 6.01.7601.17514


From: Robert Shubert [mailto:[email protected]]
Sent: Friday, February 22, 2013 5:32 PM
To: [email protected]
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:[email protected]]
Sent: Friday, February 22, 2013 3:31 PM
To: [email protected]
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… tthe <meta http-equiv=”content-type” content=”text/html; 
charset=UTF-8”> is in the header.





From: Robert Shubert [mailto:[email protected]]
Sent: Friday, February 22, 2013 1:52 PM
To: [email protected]
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:[email protected]]
Sent: Wednesday, February 20, 2013 8:43 AM
To: [email protected]
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 [email protected] 
with "unsubscribe terascript-talk" in the body.


  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.


  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.


  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.


  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.




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

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to