[ic] UTF-8 in table_editor

docelic docelic at hcoop.net
Tue Jun 26 15:55:56 EDT 2007


On Tue, Jun 26, 2007 at 02:51:31PM -0400, Bill Carr wrote:
> I am having difficulties with UTF-8 data in the table_editor. I am  
> using MySQL for my data store. I am able to insert UTF-8 data using  
> the table_editor and it appears correct in MySQL command line. If I  
> output the data in a text input box as below it appears correct.
> 
> 	<input value="[data mytable mycol mykey]">
> 
> but using table_editor:
> 
> 	[table_editor
> 		table=mytable
> 		item_id=mykey
> 	]
> 
> the value in mycol field looks funky.
> 
> In Vend::Form.pm there's a line like so:
> 
> 	$opt->{encoded} = encode($opt->{value}, $ESCAPE_CHARS::std);
> 
> if I comment that line and replace with:
> 
> 	$opt->{encoded} = $opt->{value};
> 
> table_editor outputs good looking data for mycol.
> 
> Any ideas of how to make table_editor work better with my UTF-8 data?

Hi Bill,

you were on the right track. Just add "\X" to $ESCAPE_CHARS::std
and that will solve the problem.

This is already done in Interchange CVS head.

Regards,
-doc


More information about the interchange-users mailing list