PDA

View Full Version : ComboBox and Unicode



archmisha
29 Aug 2009, 8:16 AM
When i send unicode characters to combo box from server (hebrew in my case),
If i dont encode it into ascii, then the browser receives it wrong and wont display it in the combo box. When viewing in firebug i see the string i sent cut in the middle...

But i encode it in the server side, everything arrives ok, but combo box displays:
ז in its box when some value is selected.
Although in the drop down it is displayed fine.

That happens because in the textfield the text displayed as it really is, but in the drop down box html converts it to the unicode character.

My question is how can i solve this issue?
Has anyone had to cope with this before?

Thanks.

(If i explained it badly in some way please let me know)

J@y
30 Aug 2009, 12:12 AM
You don't need to do any encoding in the server side, just pass the text directly to the client side.
(* if your text has been encoded already in the database, pls decode it b4 passing to client)

And then your webpages should be saved in unicode format.

archmisha
30 Aug 2009, 3:27 AM
problem is that if i dont encode at server side, then the received string as i see it in firebug is cut in the middle...
as i understand the unicode character might take more than 1 char size or something like that, so maybe content size is not fit in not encoded state.