Thanks Phillip. We'll try that.

On 5/16/06, Phillip B. Holmes <[EMAIL PROTECTED]> wrote:
>
> Here ya go.
>
> <cfscript>
>         myField = 'A named mapping between sequences of sixteen-bit
> Unicode
> characters and sequences of bytes';
>         this.jcharset = createObject('java', 'java.nio.charset.Charset');
>         // convert to string
>         strText = toString(myfield);
>         // instantiate instance of jcharset with orginal encoding as arg
>         charsetBefore = this.jcharset.forName("ascii");
>         // instantiate instance jcharset with new encoding as arg
>         charsetAfter =  this.jcharset.forName("Cp1047");
>         // convert text to byte array with original encoding
>         charBytes = charsetBefore.encode(toString(strText));
>         // decode with new encoding assign to struct member
>         data = charsetAfter.decode(charBytes).toString();
> </cfscript>
>
>
> You'll need the extended charsets.jar added to your class path to
> support EBCDIC. (lib/charsets.jar)
>
> See:
> http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
>
>

-- 
Mike T
Blog http://www.socialpoints.com/


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240731
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to