ausprouty
Posts: 2
|
Posted: 10/12/2006, 10:40 AM |
|
I'm trying to make a listbox where a person can select "language".
I don't want all the options to be in English; instead I want them be in the native font.
I get output that looks like: & #1593;& #1585;& #1576;& #1610
I would like to see the actual foreign font here
Any ideas?
==========================================
The html source is:
<<OPTION VALUE="47">Afrikaans</OPTION>
<OPTION VALUE="3">عربي</OPTION>
<OPTION VALUE="11">汉语</OPTION>
<OPTION VALUE="1" SELECTED>English</OPTION>
<OPTION VALUE="2">Français</OPTION>
<OPTION VALUE="14">Ελληνικά</OPTION>
<OPTION VALUE="19">Italiano</OPTION>
<OPTION VALUE="43"></OPTION>
===============================
|
|
|
peterr
Posts: 5971
|
Posted: 10/12/2006, 10:52 AM |
|
Your above HTML works OK for me. Just please make sure that you don't have spaces between "&" and "#".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Bob Prouty
|
Posted: 10/12/2006, 4:28 PM |
|
It would be nice if the code looked the way I pasted it in. Unfortunately it does not.
Here is a better attempt to show what it is:
<OPTION VALUE="3"> & amp; #1593; & amp ;#1585;& amp ;#1576;& amp ;#1610;</OPTION>
(there are no spaces. I put them in to show the problem of the "amp" being in the source code.).
Any idea how to get these out?
|
|
|
peterr
Posts: 5971
|
Posted: 10/12/2006, 7:25 PM |
|
OK, I see it now. Previously I thought that it was an HTML listbox. If you're retrieving listbox values from a database then I am afraid that this won't work - you can check with the support if there is a workaround.
A standard method (and best practice) to handle multi-lingual values on a single page would be to use the Unicode (UTF-8) encoding. Then you can just enter values in each language (not ASCII symbols) and they will be automatically displayed appropriately.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
ausprouty
Posts: 2
|
Posted: 10/12/2006, 7:59 PM |
|
My data is UTF-8. This is what Codecharge does to my values. Not fun.
I'll check with support for a workaround.
Bob
|
|
|
peterr
Posts: 5971
|
Posted: 10/12/2006, 8:18 PM |
|
Your data is not saved in UTF-8 format, only in Unicode ASCII codes as you have showed.
Saving data in UTF-8 works fine with listboxes. عربي
BTW, it's also possible that your database doesn't store UTF-8 encoded data.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
peterr
Posts: 5971
|
Posted: 10/12/2006, 9:06 PM |
|
One more test you might try: change your listbox to a textbox, or create an editable grid like I did below. This way you can check if your data is UTF-8 encoded or not. Plus you can enter your data into editable grid in native language and immediately check if it was entered correctly, stored properly encoded in your database, and displayed correctly.
A listbox should basically display the same data that a textbox does.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Bob Prouty
|
Posted: 10/14/2006, 5:05 PM |
|
You are right. I didn't know I need to set the table to utf8.
Once I typed the following line everything worked fine. Thanks for your help.
==============================================
ALTER TABLE arcLanguage CHARACTER SET utf8
|
|
|
peterr
Posts: 5971
|
Posted: 10/14/2006, 5:56 PM |
|
Thanks for clarifying the solution, especially for future users who may read this. I'd only add that a similar problem may happen if the maintenance page where the data was entered had a different encoding than another page that displays the data (whether UTF-8 or other.)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
optron
Posts: 114
|
Posted: 10/27/2006, 4:22 PM |
|
I run into similar problem. When I enter data with POLISH national characters it looks fine on the record form, then when I save the record and go back to grid all national characters are replaces with garbage. The project is set for UTF-8, with 3 languages (Polish, English and German). Default i Polish. I use Access dB at the moment and plan to upsize it to MSQL in the future, so my question is if I need to setup someting in .MDB file at all.
MY WinXP has a keyboard set to Polish-programers and I'm not really sure how this corelates to UTF-8 (or better UTF-16) ?
Any suggestions ?
Arthur
_________________
==============================
don't forget to check: www.youngliving.us
use: 739947 to register |
|
|
peterr
Posts: 5971
|
Posted: 10/27/2006, 5:40 PM |
|
1. .MDB is fine - nothing to setup.
2. Try using editable grid as the above screenshot shows.
3. Check your HTML page encoding like the above screenshot also shows.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|