6.0.0-git
2019-03-20

[#2053] serialize problem
Summary serialize problem
Queue Ulaform
Type Bug
State Resolved
Priority 1. Low
Owners
Requester david (at) tmv (dot) gov (dot) tw
Created 2005-05-31 (5041 days ago)
Due
Updated 2005-06-10 (5031 days ago)
Assigned 2005-06-06 (5035 days ago)
Resolved 2005-06-09 (5032 days ago)
Milestone
Patch No

History
2005-06-10 10:54:42 Jan Schneider Comment #12 Reply to this comment
Committed, thanks.
2005-06-10 03:26:05 david (at) tmv (dot) gov (dot) tw Comment #11
New Attachment: sql.php.patch Download
Reply to this comment
Thank you ,chuck & jan.

Mean while,getField() also require to fix ,patch was attached.



David
2005-06-09 08:59:53 Jan Schneider Comment #10
State ⇒ Resolved
Reply to this comment
Fixed in CVS.
2005-06-09 03:01:03   New Attachment: edit_field.gif Download
 
2005-06-09 03:00:48   New Attachment: new_field.gif Download
 
2005-06-09 03:00:32   New Attachment: edit_form.gif Download
 
2005-06-09 02:59:06 david (at) tmv (dot) gov (dot) tw Comment #9
New Attachment: new_form.gif Download
Reply to this comment
David-

We pass the data through Horde_Serialize(), so I'm not surprised that
it's not the original data. That's how we handle form_params, too, so
do those work for you? I'm not sure what the difference is, if you
could have a peek at the code that'd be great.
Both saveForm() & saveField () save UTF7 format(i guess) to database 
now,but some columns can't be tarnsfered  to chinese string while 
click edit form/field.



Screenshot for your information:

new_form.gif : New a form which form's name in chinese.

edit_form.gif  : Edit that form,form's name no more in chinese.

new_field.gif : New a field which values and prompt in chinese.

edit_field.gif : Edit that field,value & prompt no more in chinese.



David




2005-06-08 19:25:20 Chuck Hagenbuch Comment #8 Reply to this comment
I really don't know what you're getting at. Can you answer the 
question about form_params vs. field_params?
2005-06-08 08:11:00   New Attachment: serialize-in-url.php Download
 
2005-06-08 04:03:11 david (at) tmv (dot) gov (dot) tw Comment #7
New Attachment: serialize-in-phpshell.jpg Download
Reply to this comment
That's a weird thing about serialize function in Horde H3 (with php 4.3.10)

The length of chinese string in Horde's php-shell was serialize as 3x 
by every single chinese not 2x ,i think that is why cause this issue.

Screenshot : serialize-in-phpshell.jpg will explain what i'd say.



On the other hand,running script in serialize-in-phpshell.jpg  instead 
of  http://210.241.49.68/~txg16/serialize-in-url.php ,and this time 
string length serialized  correctly with 2x by every single chinese.




2005-06-06 18:27:42 Chuck Hagenbuch Comment #6 Reply to this comment
David-



We pass the data through Horde_Serialize(), so I'm not surprised that 
it's not the original data. That's how we handle form_params, too, so 
do those work for you? I'm not sure what the difference is, if you 
could have a peek at the code that'd be great.
2005-06-06 11:30:48 Jan Schneider Comment #5 Reply to this comment
Huh?
2005-06-06 04:28:43 david (at) tmv (dot) gov (dot) tw Comment #4 Reply to this comment
The length in field_params about values was fixed,but not store as
the original multibyte string,eg. enter chinese in th form.

David

a:2:{s:6:"values";s:13:"+kHhT1lA8geo-";s:6:"prompt";s:0:"";}
length=13 (OK)

string=+kHhT1lA8geo- (Not OK)
2005-06-06 04:26:47 david (at) tmv (dot) gov (dot) tw Comment #3 Reply to this comment
The length in field_params about values was fixed,but not store as the 
original multibyte string,eg. enter chinese in th form.



David



a:2:{s:6:"values";s:13:"+kHhT1lA8geo-";s:6:"prompt";s:0:"";}

                                          ^^^^^^^^^^^^^^^^^
2005-06-06 03:55:46 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
2005-05-31 08:30:57 david (at) tmv (dot) gov (dot) tw Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ serialize problem
Queue ⇒ Ulaform
Reply to this comment
Incorrect serialized paramater was saved to 
ulaform_fields:field_params,if use non ASCII in it.



For example,create new form with "Drop down list" type ,and use 
multibyte in values.



Here are the record point to the it.

a:2:{s:6:"values";s:15:"??1,??2";s:6:"prompt";s:0:"";}

should be  fixed as ==>

a:2:{s:6:"values";s:11:"??1,??2";s:6:"prompt";s:0:"";}




Saved Queries