CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Listbox for unicode text

Print topic Send  topic

Author Message
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">&#1593;&#1585;&#1576;&#1610;</OPTION>

<OPTION VALUE="11">&#27721;&#35821;</OPTION>
<OPTION VALUE="1" SELECTED>English</OPTION>
<OPTION VALUE="2">Français</OPTION>
<OPTION VALUE="14">&#917;&#955;&#955;&#951;&#957;&#953;&#954;&#940;</OPTION>
<OPTION VALUE="19">Italiano</OPTION>

<OPTION VALUE="43"></OPTION>
===============================
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.