German special chars and utf-8 | russian language

German special chars and utf-8 | russian language

ChrisSChrisS Posts: 14Questions: 0Answers: 0
edited July 2009 in Bug reports
Hello,

it seems, that special chars (like the german

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Chris,

    Does this demo work for you http://datatables.net/examples/example_language_file.html ? It does the trick quite nicely for me. All my files should be UTF8. Also does it occur on all browsers for you?

    Thanks,
    Allan
  • ChrisSChrisS Posts: 14Questions: 0Answers: 0
    edited July 2009
    Hi Allan,

    Yes, the demo works in all browsers, but in that link it is English language. Or is it a missunderstanding by me?

    And yes, all your files are UTF-8, i checked that. Btw it doesn't work in all Browsers. I'm in contact with the ISP to verify, that there is no problem with the server because they configured the server in a way that you have to set php header UTF-8 in addition to the html metas. Also I tried to set . Nothing worked out!

    I will try to setup a demo-area on the server to show you the result. But it will last a few days, I'm really busy at time.

    Thank you for your quick response! :-)

    Chris
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Chris,

    Have a look at the language around the table itself (not the explanation text). For example: "1 bis 10 von 57 Eintr
  • ChrisSChrisS Posts: 14Questions: 0Answers: 0
    edited August 2009
    Hi Allan,

    look by yourself: http://www.rheita.com/produkte.php?sub=2 :-)

    And now I am struggeling over new problems.

    1. Due to long loading times for large tables in IE6 I changed the table generation to automatic using aaData and aoColumns. Inside the table there are images with jQuery thickbox behaviour. Also the detail-link uses thickbox. The thickbox will work properly, when dataTables is ready drawing the table. BUT - when I use the oLanguage with a file on the server, thickbox stops working. I guess it has something to do with the loading time of the file.

    2. With my settings for the generated table IE6 and IE7 shows a warning 'Warning - added data does not match column length', FF2 shows the table in the correct way. Now I am totally confused and I am thinking about stepping back to the HTML-Table. But the loading time in IE6 is awfull slow!!!

    May be I am doing something totally wrong. Any suggestions?

    Did I told you, that you have coded a pretty nice piece of software? Really great!!!

    Greets Chris

    PS: I have forgotten to tell you that I am not very experienced in JS :-(
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Chris,

    Regarding you language file - it looks like it isn't utf8 on the server: http://www.rheita.com/web/lib/js/jquery/dataTables/language/de.txt . Did you transfer it using FTP ASCII or binary? Also if you have shell access to the server, run the 'file' command on that file - it should tell you the encoding type.

    1. The reason for this is that DataTables loads the language file using an async XHR - therefore the processing continues while the file is loading and thickbox finds nothing to work with. What to do is to use the fnInitComplete() function to initialise thickbox.

    2. Your arrays having a trailing comma with a blank element after them. IE and Firefox interpret this differently. Firefox throws it away, IE sees it as an element - personally I would say IE was correct here... Just drop that last comma and it should work.

    Allan
  • ChrisSChrisS Posts: 14Questions: 0Answers: 0
    edited August 2009
    Hi Allan,

    impressive - what you are doing. Thanks a lot for your quick response.

    First, your hints for thickbox and the 'Warning' message solved the problem. To the trailing comma: "Sometimes you can't see the forest because of the trees." - German proverb :-)

    With the servers UTF-8 settings, i do not understand that. Because all content of that page ist UTF-8, the database output, the included files, etc. I do not have shell-access to the server and I uploaded the file out of my IDE NuSPhere PHPEd, like all the other (working) files. I guess it has something to do with the server because of the need to set php header to UTF-8. But I have no idea what setting is wrong at the server. So I asked you, my hope had been, that you have experienced that problem earlier ... :-) Will it help to post the php_info()?: http://www.rheita.com/web/___phpinfo.php (Info 20090826: Link isn't existing anymore - Chris)

    One last Question:
    Do you have a suggestion about a better way to inject mysql-data into dataTables than HTML-coding or aaData Array?

    Many thanks

    Chris
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Chris,

    The UTF8 problem - it might not be a server issue, but simply how your transferred the file onto the server. I presume you are using ftp? Any chance you could use sftp? When you transfer the file with ftp it will do the transfer with either ascii or binary. For UTF8 you want it to use binary. The file on the server looks wrong, so I don't think it's an issue with the server itself. Do you have a copy of the file locally? If you open that does it work for you? If so then it's almost certainly how you transferred the file.

    Regarding your question about the speed - one thing you can do to speed things up is to disable the 'sort classes' (the column highlighting) as this can take up quite a bit of processing time: http://datatables.net/usage#bSortClasses . The other option is to make use of server-side processing: http://datatables.net/1.5-beta/examples/data_sources/server_side.html

    Regards,
    Allan
  • ChrisSChrisS Posts: 14Questions: 0Answers: 0
    edited August 2009
    Hi Allan,

    thanks a lot for your help.

    - The speed-thing is due to dom-parsing in IE6. That issue is solved by using the aaData-array. The loading time - even with more than 400 records (each record with two images) - is ok now. Furthermore I have integrated an easy loading animation. Together it works fine (and - I hope - userfriendly). Have a look if you want: http://www.rheita.de/produkte.php?sub=2

    - The UTF-8 problem seems to be a server-problem. At other ISPs (and self-configured servers) I never have had such kind of problems, even with the automatic upload function of PHPEd. I am in contact with the ISP and they will reconfigure the server.

    - I am actually thinking about using server-side-processing, but not for this customer. We have developed a php-framework with many content modules. And I think in the next release (based on Yii) we will integrate your fantastic tool!!! But that will take a couple of month (to the next release).

    I will inform you about the UTF-8 issue when I get feedback from the ISP.


    Best regards - Chris

    Donation to where ...? :-)
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Chris,

    1. Speed issue: I like the loading bar - looks good.

    2. UTF-8 issue: It's really odd that. I wonder if Apache might not be built for handing UTF-8, but that seems quite an odd configuration. Please do let us know if you find anything out, for future reference.

    3. PHP framework: Sounds very interesting. 1.5 is about one week away from going final now, and the web-site documentation will be updated at that time (which polishing off writing it at the moment :-) ).

    4. Donations: Any donation would be greatly appreciated ;-). If you would like to make one: http://datatables.net/donate

    Regards,
    Allan
  • ChrisSChrisS Posts: 14Questions: 0Answers: 0
    A box of beer is on the paypal way ;-)

    Regards,
    Chris from Boppard
  • ChrisSChrisS Posts: 14Questions: 0Answers: 0
    edited August 2009
    Hi Allan, hello community,

    finally we solved the problem with that UTF-8 thing. The server, where dataTabels is hostet, wasn't set to process UTF-8 as default charset. So in our case the solution was simple, but tricky to find out.

    - Create or edit a .htaccess file in servers root
    - Add the following line:
    AddDefaultCharset UTF-8

    This works with Apache with our servers configuration. If you have root-access, set the apache to handle utf-8 as default charset too.

    @Allan: Thanks a lot for your patience and support.

    Regards Chris
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Chris,

    Thanks very much for the update on this. Good to hear you got it sorted, thanks for letting us know how to get it sorted!

    Regards,
    Allan
This discussion has been closed.