Hi,
My CKFinder resides on a site that is in a language that has characters with accents (French).
Some of the messages displayed don't appear properly.
For example when I upload a file more than once (or if a file with the same name already exists in my userfiles) the message that basically says that a file with the same name exists and that the uploaded file has been renamed appears in French as such:
Un fichier avec ce nom existe déjà . Le fichier téléversé a été renommé en "file(1).jpg"
instead of
Un fichier avec ce nom existe déjà . Le fichier téléversé a été renommé en "file(1).jpg"
However other messages, like the one asking me to confirm if I really want to delete a file displays the accented characters properly:
Êtes-vous sûr de vouloir effacer le fichier "file.jpg" ?
These two messages seem to be generated by a different mechanism. The message that is not displayed properly takes it's text from the file fr.xml while the other message takes it from fr.js.
I would like to be able to display all messages properly.
Is there a file that I have to modify to display properly the xml generated messages that have characters with accents?
Do I have to change in a given file the encoding from charset=utf-8 to something else? (For example, charset=ISO-8859-1). Which file would it be?
For example I have tried to change the encoding in file standalone.html to "charset=ISO-8859-1 " but that didn't correct the problem with my error messages in French.
Thanks,
Scribe
Note:
I am using the ASP version of CKFinder
Site developped in Visual studio 2003
My CKFinder resides on a site that is in a language that has characters with accents (French).
Some of the messages displayed don't appear properly.
For example when I upload a file more than once (or if a file with the same name already exists in my userfiles) the message that basically says that a file with the same name exists and that the uploaded file has been renamed appears in French as such:
Un fichier avec ce nom existe déjà . Le fichier téléversé a été renommé en "file(1).jpg"
instead of
Un fichier avec ce nom existe déjà . Le fichier téléversé a été renommé en "file(1).jpg"
However other messages, like the one asking me to confirm if I really want to delete a file displays the accented characters properly:
Êtes-vous sûr de vouloir effacer le fichier "file.jpg" ?
These two messages seem to be generated by a different mechanism. The message that is not displayed properly takes it's text from the file fr.xml while the other message takes it from fr.js.
I would like to be able to display all messages properly.
Is there a file that I have to modify to display properly the xml generated messages that have characters with accents?
Do I have to change in a given file the encoding from charset=utf-8 to something else? (For example, charset=ISO-8859-1). Which file would it be?
For example I have tried to change the encoding in file standalone.html to "charset=ISO-8859-1 " but that didn't correct the problem with my error messages in French.
Thanks,
Scribe
Note:
I am using the ASP version of CKFinder
Site developped in Visual studio 2003
Re: Problem with messages with accented characters
I am sure there must be someone else that has tried CKFinder in a language that has accents.
I have also tried in Spanish. The message that says 'A file with the same name is already available. The uploaded file has been renamed to "6229961(17).jpg' in English appears the following way in Spanish:
Ya existÃa un fichero con ese nombre. El fichero subido ha sido renombrado como "file(1).jpg"
it should be:
Ya existía un fichero con ese nombre. El fichero subido ha sido renombrado como "file(1)"
Has anyone else had this problem? Any input would be appreciated.
Thanks
Re: Problem with messages with accented characters
Re: Problem with messages with accented characters
I am having the problem in Internet Explorer (IE7 and IE8). I don't have the problem in Firefox (5.0.1).
Re: Problem with messages with accented characters
Open the core/connector/asp/ErrorHandler/FileUpload.asp
and at line 55, just below the commented response.clear add this
Response.charset="utf-8"
Save it and now test again.
My tests are working fine and I get the correct messages.
Please, confirm that it has solved your problem.
While testing this issue I've found that filenames with non-ascii names aren't downloaded correctly with IE, but I can't make that work correctly. I've managed to adjust it so it can show correctly the file name, but in that case it appends a [1] after the extension, and I don't understand where that's comming from.
Re: Problem with messages with accented characters
Thanks alfonsoml, once again you are a savior.
Concerning the upload of files named with accented characters, it seems to be working perfectly for me in Internet Explorer. For example, I have tried (in IE7) to upload a file named "FélìçitàtÏÔÑ.txt".
The file is uploaded perfectly with the right name. I view it without any problem and the warning message when I try to delete it displays the name of the file correctly (I will try with other versions of IE).
So for now everything is working fine thanks to your help (time for me to get my license).
Scribe
Re: Problem with messages with accented characters
Re: Problem with messages with accented characters
Works well in Firefox.
Re: Problem with messages with accented characters
Here is an image of the problem while downloading file named with accented characters:
I have tried to find a solution on the web. For example this site mentions this very same problem:
http://www.codeproject.com/KB/aspnet/NonUSASCII.aspx
But I am not quite able to code it properly in ASP.
The FileDownload dialog seems to be generated in file "FileSystems.asp" (core/connector/asp/Utils) with the following code:
Attachments:
Re: Problem with messages with accented characters
I still have to perform more tests to check if this can work for all the browsers, but this is my modification so far:
Re: Problem with messages with accented characters
I have tried your very clever solution in IE7. The accented file name appears correctly in the File Download dialog. It is also captured correctly when we click the Save button to attempt to save the file.
However, when we click the Open button in the File Download dialog, the file name is not displayed properly in the caption of the window (of Notepad for example).
I have also tried with a file named simply file(1).txt , the filename in the caption of the Notepad window is also changed.
Please see the following images:
I have tried to put a Response.Charset="utf-8" somewhere in your solution so that the filename would be transferred correctly from the File Download dialog to Notepad, but it didn't work.
Any other solution?
Thanks,
Scribe
Attachments:
Re: Problem with messages with accented characters
But now the problem is not only IE, but also how it passes data to other applications and if they are ready for encoded filenames or not. If instead of Open you click Save, the file will be saved correctly, but if you click open, you don't know where it has been saved, so I don't think that the filename is so important because you can't use it again. It's in a temp folder of IE, so it's usually out of reach for the user.
And also: I've tested and IE8 seems to be able to pass the data to notepad in a way that it can open the file with the expected filename, so your solution is just to upgrade that IE7 to IE8, or tell the users to save the file instead of try to open them directly
Re: Problem with messages with accented characters
Thanks for your reply. I totally agree with your conclusion. I have tested it in IE8 and everything works well.
Thank you very much for your help. The clarity and precision of your replies were really appreciated.
I consider the two issues that were raised in this topic as being SOLVED!
A million thanks,
Scribe
Re: Problem with messages with accented characters
Also thanks to you for being able to understand me
Other times when I try to explain that some bug is outside our scope to some people, they act like I'm trying to fool them, or that I'm the fool and that the problem could be easily solved.
Thanks to your correct reports the next version of CKFinder will include these fixes (at least in asp, I haven't tested the other connectors)
Re: Problem with messages with accented characters
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+