Skip to main content

Coldfusion 8: Insert Arabic Characters into mysql Database

Question:

I'm trying to insert Arabic character from coldfusion 8 into mysql 4.1 DB the DB collation is utf8_unicode_ci

The form is in utf-8 enicoding.

When I use the php mysql admin and try to inset Arabic it works fine but when I use coldfusion I get ??????????

Any idea?

------------

Answer:

assuming that the db is correctly setup for unicode and that you're using JDBC

driver (not ODBC) then:

add

useUnicode=true&characterEncoding=utf8

to the connection string box found in the advanced menu for that DSN.

Comments

  1. How can we manage this in shared hosting environment? Is it possible to implement this in coding ? May be, we can us admin API. But that is also banned in shared hosting.

    ReplyDelete
  2. I had this problem with my new hosting company, I have sent them a ticket specifying what exactly I need to do with the DSN and they implemented it for my DSN and it worked fine. So just drop them a ticket.

    ReplyDelete

Post a Comment

Popular posts from this blog

Top Google Adsense Alternatives

Google Adsense is a web tool that allows publishers in the Google Network of content sites to automatically serve text, image, video, and rich media adverts that are targeted to site content and audience. These adverts are administered, sorted, and maintained by Google, and they can generate revenue on either a per-click or per-impression basis.  Google servers advertisers using google adwords platform, while adsense is the publishers platform. Google Adsense is the top Ad Publishers platform over the web ranking number one in web advertising industry. Adsense offers contextual advertisements that covers web sites, blogs, games, videos, mobile browsing etc. What made Google Adsense no. 1 is the reliability, stability, variety of services and large number of publishers including google it self. Also google has a fair platform that detects invalid clicks so google successfully protects its advertisers and also offers its best publishers top CPC. Two reasons are behin...

ERROR: cross-database references are not implemented

You face this error while trying to query two tables from difference databases in Postgres, as Postgress is unlike SQL Server, you can't join two tables from different databases. Instead you may have One Database with Two different Schemas . Schemas group your data tables separately and give you the flexibility to query and join tables from across schemas in the same Database. So if you have DB1 and DB2, you need to move the tables in DB2 to DB1 but in a new schema. If you are using the public schema in DB2 you need to change the name:   alter schema public rename to new_schema_name ; create schema public ;   Now Backup your Schema: $ pg_dump --format custom --file "my_backup" --schema " new_schema_name " "db2" $ pg_restore --dbname "db1" "my_backup" Your Done. If you have any question please let me know.

Google Analytics on Refined Wiki Mobile Theme

Tracking mobile users on Confluence while using Refinedwiki mobile theme is not possible or straightforward using theme configuration. I found a work around that will track users on Google Analytics smoothly. Please follow the below steps: Create a js file, call is analytics.js with the analytics script code, it should look something similar to the below:   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');   ga('create', ' UA-XXXXXX ', 'auto');   ga('set', 'userId',AJS.Data.get("remote-user")); // Set the user ID using signed-in user_id.    ga('send', 'pageview'); Save your script on confluence server confluenceInstall...