Archive

Posts Tagged ‘coldfusion’

ColdFusion Fonts

October 8th, 2008 rupert Comments off

I was trying to make a chinese text drawn in an image. That worked flawlessly on my Mac. Upon svn updating my files in production, the characters in the image became squares again.

Picture 4.png

First hunch was to change my file.encoding as from my previous post. But didn’t helped, so I changed the font from the CF code itself..

 <cfset attr = StructNew() />
 <cfset attr.size = 16 />
 <cfset attr.style = "plain" />
 <cfset attr.font = "microsoft yahei" />

I noticed that using the obvious fonts (Arial, Tahoma) didn’t worked. It always complained it can’t find the font…

Picture 5.png

I remember using msyh.ttf (Microsoft Yahei) in Mapserver for producing Chinese text. So what I did was, I copied msyh.ttf and dropped it in the coldfusion fonts directory (/opt/coldfusion8/runtime/jre/lib/fonts) then restarted coldfusion. Afterwards, I was able to see msyh.ttf from the Font Management of CFIDE Administrator. From there… I was able to display the image with Chinese Characters..

Picture 3.png

Categories: coldfusion Tags: ,

ColdFusion: Specifying -Dfile.encoding

September 22nd, 2008 rupert Comments off

I have a small project to use a jar file for sending/receiving SMS in chinese. I could send the SMS fine from Eclipse, so I thought creating a Java Class wrapper to be used by ColdFusion so it can be called from HTTP could do the trick.

After a few minutes, I have the class up and running and fully tested within Eclipse.

1. I dropped the class, dll and its jar in C:\ColdFusion8\lib. Take note its a Windows box, since the Jar is using a dll to talk to the Wavecom modem using AT commands.

GSMModem.jar
GSMMultiPort.dll
GSMMultiPortForJ.dll

2. The crux was to specify the file.encoding for Java as an argument from the CFIDE Administrator. After specifying GB18030, a quick restart.. voila..

Java Version  	 1.6.0_01
Java Vendor 	Sun Microsystems Inc.
Java Vendor URL 	http://java.sun.com/
Java Home 	C:\ColdFusion8\runtime\jre
Java File Encoding 	GB18030
Java Default Locale 	en_US
File Separator 	\
Path Separator 	;
Line Separator 	Chr(13)
User Name 	SYSTEM
User Home 	C:\

Files:
CFSend.java

Categories: coldfusion Tags: , ,

ColdFusion CheatSheet

January 5th, 2008 rupert Comments off

There are many coldfusion programming techniques that I always grep/search in my applications. It is time to put them all in one place.

1. How to set different alternating row colors?

Categories: coldfusion Tags: ,

Upgrading to ColdFusion8

August 19th, 2007 rupert Comments off

I had the liberty of upgrading to ColdFusion 8. Works smoothly…

  • Install took some time.
  • Memory peaks instantly at 250M
  • Binding to Apache2.2 was seamless. No need to use the updated wsconfig.jar
  • New ColdFusion Administrator. Debugging looks promising…
Categories: coldfusion Tags: ,

Installing CFMX7 on CentOS5

July 24th, 2007 rupert No comments

1. You need to install libXpm beforehand to save time in the Graphing Service Error Problems.


rpm -ivh libXpm-3.5.5-3.i386.rpm

2. Modify the installer.
cat coldfusion-702-linux.bin.backup | sed “s/export LD_ASSUME/#xport LD_ASSUME/” > coldfusion-702-linux.bin

Reference: http://www.billmitchell.org/coldfusion/centos5/mx7_apache.php

POST-INSTALL

1. Disable Verity search if you don’t use it.

chkconfig cfmx7search off

Categories: coldfusion Tags: , ,