Re: inserting farsi/arabic entry to database with CF
> > thanks a lot Russ . from the links you gave I realized that maybe > the cfprocessingdirective tag is the solution . but I don't know > what's going > > wrong that when I wrap my cfquery tag inside the > cfprocessingdirective it gives me error and says that the > tag doesn't > > have a start tag! > > here's the code I don't know what's wrong : > > > > > > > > insert into main(name,writer) values('ã','È') > > > > > > You can't wrap code within CFPROCESSINGDIRECTIVE. You simply place it > at the top of the page, without a closing tag. But in any case, that > will only control the page that's being generated (not the queries > within the page). > > You'll need to ensure that data sent to the page is also UTF-8, using > setEncoding: > http://www.adobe. com/support/coldfusion/int> ernationalization/internationalization_cfmx/internationalization_cfmx4. > html > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on > GSA Schedule, and provides the highest caliber vendor-authorized > instruction at our training center -- thank you all guys , I fixed it . first I added these four tags to the top of my code: and I also checked the "Enable High ASCII characters and Unicode for data sources configured for non-Latin characters." in AdminPage>Data Sources> Edit data source > show advanced setting thank you all ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339002 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: inserting farsi/arabic entry to database with CF [spamtrap bayes][spamtrap heur]
>> You also need to consider your collation settings. >> http://msdn.microsoft.com/en-us/library/ms144260.aspx in this case, no you don't. > values( cfsqltype="cf_sql_varchar">, cfsqltype="cf_sql_varchar">) if you're using cfqueryparam tags (and you should) you 100% need to set the String Format -- Enable High ASCII characters and Unicode for data sources configured for non-Latin characters *on* for that DSN (it's in the "advanced settings"). and yes it works fine: http://www.sustainablegis.com/unicode/ to test yourself see: http://www.sustainablegis.com/unicode/greekTest.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: inserting farsi/arabic entry to database with CF
> thanks a lot Russ . from the links you gave I realized that maybe the > cfprocessingdirective tag is the solution . but I don't know what's going > wrong that when I wrap my cfquery tag inside the cfprocessingdirective it > gives me error and says that the tag doesn't > have a start tag! > here's the code I don't know what's wrong : > > > > insert into main(name,writer) values('ã','È') > > You can't wrap code within CFPROCESSINGDIRECTIVE. You simply place it at the top of the page, without a closing tag. But in any case, that will only control the page that's being generated (not the queries within the page). You'll need to ensure that data sent to the page is also UTF-8, using setEncoding: http://www.adobe.com/support/coldfusion/internationalization/internationalization_cfmx/internationalization_cfmx4.html Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training center ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338969 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: inserting farsi/arabic entry to database with CF
> Hi, > > the first thing to check is that you are using the correct datatype in > the > database. Many foreign languages require double byte characters which > requires you to us ethe n prefix data tyles, e.g. nVarchar, nChar etc. > > You also need to consider your collation settings. > http://msdn.microsoft.com/en-us/library/ms144260.aspx > > And you need to consider the character encoding on the cf pages to > make sure > is displays and submits data in the correct encoding format. > http://www.adobe. com/support/coldfusion/int> ernationalization/internationalization_cfmx/internationalization_cfmx3. > html > > > > -- > Russ Michaels > www.cfmldeveloper.com - Supporting the CF community since 1999 > FREE ColdFusion/Railo hosting for developers. > > blog: www.michaels.me.uk --- thanks a lot Russ . from the links you gave I realized that maybe the cfprocessingdirective tag is the solution . but I don't know what's going wrong that when I wrap my cfquery tag inside the cfprocessingdirective it gives me error and says that the tag doesn't have a start tag! here's the code I don't know what's wrong : select * from main insert into main(name,writer) values(,) delete from main where name= insert into main(name,writer) values('٠','ب') ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338967 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: inserting farsi/arabic entry to database with CF
Hi, the first thing to check is that you are using the correct datatype in the database. Many foreign languages require double byte characters which requires you to us ethe n prefix data tyles, e.g. nVarchar, nChar etc. You also need to consider your collation settings. http://msdn.microsoft.com/en-us/library/ms144260.aspx And you need to consider the character encoding on the cf pages to make sure is displays and submits data in the correct encoding format. http://www.adobe.com/support/coldfusion/internationalization/internationalization_cfmx/internationalization_cfmx3.html -- Russ Michaels www.cfmldeveloper.com - Supporting the CF community since 1999 FREE ColdFusion/Railo hosting for developers. blog: www.michaels.me.uk ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338966 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
inserting farsi/arabic entry to database with CF
hi , my first post in house of fusion I think . I'm new to CF . my problem is that I'm trying to insert an entry to my database . the problem is that this entry is in farsi like "سÙÛد دÙداÙ" and when I do it via the cfquery tag the entry in database(which is microsoft sql) is like ??? . I searched the web and I found some posts about unicodes but I didn't quit understand those . so if you can help me with this I'll be appreciated . ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338965 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm