Thank you Robert... that explains a lot. It also helped form the answer to
my client.




  _____

From: Robert Shubert [mailto:[email protected]]
Sent: Thursday, July 14, 2011 11:47 AM
To: [email protected]
Subject: RE: Witango-Talk: OT - UTF-8



I'm happy to answer your questions, however it's not likely to work well to
use Witango.



I understand that I need to declare the charset to UTF-8 to display the
characters. Do I actually need to install a language pack on the server to
display?



No. The server just needs to manage data. You may need to install language
packs if you want to see the web pages render correctly in IE or have a text
editor render correctly - but it's not technically necessary for you to read
the content in order to manipulate it. Just keep in mind that if you are
manipulating UTF-8 data by hand (like in a text editor) then that text
editor must read and write UTF-8 encoded files.



Right now I have no language packs installed on any machines so when I get
Chinese text it displays as a series of boxes. Can I change the charset to
UTF-8 and just cut and paste the boxes? Will that display correctly?



It should, as long as you copy and paste with a UTF-8 capable text editor.
Keep in mind that the TAF/TCF structure uses 8859-1 encoding and therefore
cannot hold UTF-8 characters. You can't copy and paste them into the Studio
nor manually into the TAF/TCF. Also, you can't put them into an include file
because the Server will not strip out the BOM, although it will pass the
encoded characters unaltered to the webpage (I think - untested).



I think I can display both English and Chinese on the same page, is this
correct?



Of course, the first 128 characters of the UTF-8 character set are the exact
same characters as ASCII. What you can't do is use any high-bit characters
from the 8859-1 encoding without first re-encoding them into UTF-8. This
would be true for most accented characters.



I will more then likeyy be adding this text via email into the Witango
editor, is there a problem with this?



As I noted before, you cannot copy UTF-8 encoded content into the Witango
Studio. It will be corrupted.



I take it that using MS SQL for data would be a bit more complicated?



Yes, you may recall seeing that most data types in MS SQL have a variant
that begins with an 'n', such as char has nchar. Well, the n means that the
column can hold UTF-8 encoded characters. It's also true that you need to
signal in the SQL query when you are passing UTF-8 encoded content. It works
like this: UPDATE table SET column = N'My UTF-8 Encoded Text' WHERE
primary_key = 1 Note the N preceding the UTF-8 encoded string.



Is this as easy as it seems to be?



I don't believe it's easy, no.



Is there a simple step by step doc/webpage/place I could go for more
information?



Not that I am aware of, but Google is your friend.



Sorry for all the questions, but I would like to respond to the client with
at least a very base knowledge of how this will work without getting egg on
my face. Right now they have supplied me with artwork of some very base
translations for some of the headers on certain pages and I think they are
wondering if we could take the next step and actually use the language.



You should be able to get this to work if you follow these 2 steps. Although
note that I have never tried this myself, so I could be completely wrong:



1)      Force your current English pages to have UTF-8 encoding - this is
simply done by setting the Meta information on the HTML document
accordingly. If any characters look incorrect (probably question marks) on
the web page, then you must correct these first. You can use the <@CIPHER>
tag to convert from 8859-1 to UTF-8.

2)      Then place all of the Chinese text into the SQL server. Use proper
UTF-8 aware tools to do so, so that you SQL Server has properly encoded
content in it. Now, the trick is that when Witango reads data out of the
database and puts it onto the webpage it should not alter it. This is the
part I'm not 100% about. If I'm right then the UTF-8 encoded content will go
onto the webpage without issue and your browser will display it properly.
Note that you can not do ANY manipulation of the content in Witango.



Robert



  _____

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


  _____

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


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

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

Reply via email to