Crater Lake in the winter

This filter was added in Caldera Forms 1.4.4.
By default CSV files created by Caldera Forms use UTF-8 character encoding. You can change the encoding using the caldera_forms_csv_character_encoding filter. This filter can affect all forms, or just some forms.

add_filter( 'caldera_forms_csv_character_encoding', function( $encoding, $form ){
	if( 'CF42' == $form[ 'ID' ] ){
		$encoding = 'UTF-16';

	return $encoding;
}, 10, 2);

As of 1.4.4 it only controls encoding for exports of form entries. It is planned to use it for encoding of email attachments as well in version 1.5.

Where Does This Code Go?

When using WordPress hooks to customize Caldera Forms or other plugins you should not modify the plugin files, or you will lose your changes when you update the plugin. Instead you should create a small plugin to hold the custom code. It's easy, learn how here.

Technically you can add the custom code to your theme's functions.php, but then you will not be able to change your theme and keep these customizations.

Learn More