How to use Unicode for Chinese characters in ColdFusion and MySQL

Recently I worked in a project where special characters needed to be stored in a database, to be specific we needed to handle Chinese characters, to achieve this, some configurations need to be done in the ColdFusion Administrator regarding the Connection String setting and the database has to be created with certain parameters. Creating the Database to use Unicode create database meid default CHARACTER SET=utf8mb4 default COLLATE=utf8mb4_unicode_ci As you can see the character set is utf8mb4, and the collate is utf8mb4_unicode_ci.  You may […]

Editing JSON files with ColdFusion Builder

Communication between applications or services have become more common in today’s applications, and one very popular open-standard file format is JSON (Java Script Object Notation). This is a human-readable data interchange text that represents complex data or objects formed by attribute-value pairs. Sometimes you will need to create or edit a .json file in your IDE and the more complex the object, the more difficult is to read it if it is not properly formatted, to assist you in this […]

Number To Text Converter

number2TextConverter.cfc This is a component that takes a number as an argument and returns a string representation of that number. It can convert numbers in the range from 1 to 999999999. Clone or download from GitHub // Create an object c = new number2TextConverter(); // Change language c.setLanguage(‘spanish’); // Change the currency c.setCurrency( ‘MX’ ); // Converting just the number result = c.convert( 1999 ); // mil novecientos noventa y nueve // Converting the number and adding the currency at […]

Using Snippets in CF Builder

As a coder you will find yourself writing the same code over and over, or maybe copying an pasting blocks of code that is required in several files of your application; so you open the file that contains the code you want to replicate, then select and copy the text to finally open the destination document and paste the code. What if I could save that block somewhere in my favorite editor (CF Builder) and then invoke it whenever I […]