Comments (8)
there is an optional second parameter for generate() to accept custom charsets. see here:
https://github.com/IgnitedDatatables/Ignited-Datatables/wiki/Function-Reference#this-datatables-generateoutput-charset
from ignited-datatables.
Sure, default is utf-8 and I generate it utf-8. It is stored in db table as utf-8 all. That's why I am stacked and don't know how to fix it.
echo $this->datatables->generate('json','utf-8');
I think, the problem is how it posts. For example if I type 'ş', error must be query must be LIKE '%ş%', not 'LIKE '%Ä°%'.
from ignited-datatables.
use ISO-8859-1
from ignited-datatables.
cryogenix, it makes no different. Forcing to use something is not quite a solution indeed. when using dataTables without Ignited-Tables, it works. So problem is handling POST data.
from ignited-datatables.
Yahya Bey merhaba,
html encode olarak utf-8 kullandığını kontrol edebilir misiniz? Ajax ile bilgi göndermek istediğinde, html gönderdiğin değerleri utf-8 olarak yorumlamıyor olabilir. Karşılayan ajax sayfası da sonuçta farklı bir karakter görerek onu sorgulatıyordur.
Saygılarımla,
Regards.
from ignited-datatables.
n1Crack, yanıt için teşekkürler..
Öncelikle tüm sayfalar UTF-8(without BOM) ve Unix style EOL.
.htaccess'te AddDefaultCharset UTF-8
index.php'de ini_set('default_charset','utf-8');
Ajax tarafında contentType form..., utf-8
Ajax'ın çağrıldığı sayfada meta charset utf-8
ancak $this->input->post('sSearch') değişik geliyor. utf8_decode yaptığımda da '?'ne dönüyor, sanırım özünde gelen data utf-8 ama saçımızı beyazlatıyor..
from ignited-datatables.
Yusuf Bey, merhaba,
Post datasının utf-8 döndüğünü, sSearch datasını utf8 ile kodlanmış bir dosyaya yazdırarak teyit ettim.
Aynı şekilde sorgu kısmını da onayladım.
$this->writelog($this->ci->db->last_query());
if($output == 'json')
{ ...
Problem biraz daha mysql tarafında olmalı. Çünkü türkçe karakter ile arama yaptığınız zaman son çalışan sorgu yenilenmiyor. Yani bu yazının başlığına dönüp orada takılıyoruz.
get_filtering()
if($sWhere != '')
$this->ci->db->where('(' . $sWhere . ' ) COLLATE utf8_bin ');
// ya da $this->ci->db->where('(' . $sWhere . ' COLLATE utf8_bin ) ');
da bir değişiklik yaratmadı. "Illegal mix of collations for operation 'like'" kısmında yatıyor çözüm.
Veritabanını da iki kez kontrol ettim, tüm tablolar ve text alanlarında utf8 collate var, tablo charset'leri de utf8.
Umarım yardımı olur.
from ignited-datatables.
Yukarıdaki sorunun id ve datetime alanları olduğuna dair yazı. Benim örneğime uyarlayarak test ettim, sonuç id alanları problem yaratmıyor, ancak DATETIME alanı eklendiği anda "illegal collation" uyarısı çıkıyor. Sanıyorum işin Ignited-Datatables ile bir ilgisi yok, dolayısıyla teşekkür ediyor ve konuyu kapatıyorum.
from ignited-datatables.
Related Issues (20)
- This library is not useful for server side pagination and column based search feature. HOT 1
- $this->ci->having implementation HOT 2
- ->where_in ->or_where error ?
- Shorting Searching not working in codeigniter 3.0.6
- there is no usage example.
- How Can We Use plain query without query builder HOT 1
- Group by error with PostgreSQL HOT 1
- Column 'id' in where clause is ambiguous HOT 4
- Button Next Page Not working HOT 1
- Date Range Filtering for Specific Column
- Error when use the aritmatic command * and + in $this->datatabel->select( ); HOT 2
- group_start and or_group_start implementation HOT 2
- What does `check_cType()` do? HOT 5
- Callbak URL Serialize Encrypt add_column or edit_column HOT 2
- Use this version instead HOT 11
- Cant Use this Library with current Datatable version HOT 4
- Error match_replacement on add_column
- Datatables serverside with union query
- Smart Search HOT 1
- Ignited Datatables selecting all columns even when column names are specified HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ignited-datatables.