All pastes #123187 Raw Edit

Filipok

public javascript v1 · immutable
·published 2006-08-09 03:30 UTC
rendered paste body
	<cffunction access="public" name="ncr2unicode" output="false" returntype="struct" hint="         Purpose: converts NCR data to Unicode         Notes:   Server must have ncr2unicode.jar in the d:\cfusionmx\lib directory for this function to run	">		<cfargument name="field" type="string" required="no" default="">		<cfscript>			var ret = structNew();			ret.error = arrayNew(1);			ret.success = true;			ret.msg = 'SUCCESS';			ret.data = structNew();			try {				if(len(trim(arguments.field)) GT 0 AND NOT isNumeric(arguments.field)) { 					ret.data = createObject('java','ncr2unicode').convert(arguments.field);				} else {					ret.data = arguments.field;				}				return ret;			} catch(any excpt) {				try{createObject('component','com.match.control.internalErrors.internalErrorsService').record(catch_detail:excpt,smt_page_id:getMetaData(this).name,template:getMetaData(this).name);}catch(any excpt){/*foo*/}				ret.success = false;				ret.msg = 'FAIL';				arrayAppend(ret.error,excpt.Message);				return ret;			}		</cfscript>	</cffunction>